More rewrite of prohibited APIs (sprintf, strcpy, strcat).
[obnox/wireshark/wip.git] / strerror.c
index 93cc02b9a31f05939d83b05a02c275c0a294e417..34dcad88bbe4a49c02be5495ed2607d7dd564e51 100644 (file)
@@ -35,7 +35,7 @@ strerror(int errnum)
        static char errbuf[5+1+11+1];   /* "Error %d" */
 
        if (errnum < 0 || errnum >= sys_nerr) {
-               sprintf(errbuf, "Error %d", errnum);
+               g_snprintf(errbuf, 18, "Error %d", errnum);
                return errbuf;
        } else
                return sys_errlist[errnum];