From c0e326b62ac1f08e71f009b783334cff50e1c79b Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 25 Jul 2015 22:33:25 +0100 Subject: [PATCH] Add a sane limit for name length By: Thinkofdeath --- paper-server/nms-patches/Entity.patch | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/paper-server/nms-patches/Entity.patch b/paper-server/nms-patches/Entity.patch index b5720bb4aa..ee1202719c 100644 --- a/paper-server/nms-patches/Entity.patch +++ b/paper-server/nms-patches/Entity.patch @@ -574,7 +574,19 @@ } this.dead = true; -@@ -1721,7 +2081,26 @@ +@@ -1670,6 +2030,11 @@ + } + + public void setCustomName(String s) { ++ // CraftBukkit start - Add a sane limit for name length ++ if (s.length() > 256) { ++ s = s.substring(0, 256); ++ } ++ // CraftBukkit end + this.datawatcher.watch(2, s); + } + +@@ -1721,7 +2086,26 @@ } public void a(AxisAlignedBB axisalignedbb) {