]> granicus.if.org Git - graphviz/commitdiff
remove use of stack buffer in latin1ToUTF8
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 3 Oct 2020 19:17:19 +0000 (12:17 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 10 Oct 2020 17:46:07 +0000 (10:46 -0700)
For similar reasons to the prior commit.

lib/common/utils.c

index 3369677d8be189b757248b2bde963ef5305931e7..1a5df5bfb53938e22da75ac8dc3955be3bc8951e 100644 (file)
@@ -1558,10 +1558,9 @@ char* latin1ToUTF8 (char* s)
 {
     char*  ns;
     agxbuf xb;
-    unsigned char buf[BUFSIZ];
     unsigned int  v;
 
-    agxbinit(&xb, BUFSIZ, buf);
+    agxbinit(&xb, 0, NULL);
 
     /* Values are either a byte (<= 256) or come from htmlEntity, whose
      * values are all less than 0x07FF, so we need at most 3 bytes.