you have your makefiles set up to treat warnings as errors, and my gcc
4.4.5 (64 bit) compiler generates 3 warnings that need fixing:
(that sprintf() one is a real bug.. if ext_name contains formatting
characters you are looking at a potential segv).
Signed-off-by: Patrick McManus <mcmanus@ducksong.com>
if (ext_count)
*p++ = ',';
- p += sprintf(p, ext_name);
+ p += sprintf(p, "%s", ext_name);
ext_count++;
/* instantiate the extension on this conn */
NULL, &p, (pkt + sizeof(pkt)) - p - 12);
p += sprintf(p, "\x0d\x0a");
-
- read(context->fd_random, p, 8);
+
+ if (libwebsockets_get_random(context, p, 8) != 8)
+ return -1;
memcpy(&challenge[8], p, 8);
p += 8;
if (ext_count)
*p++ = ',';
- p += sprintf(p, ext->name);
+ p += sprintf(p, "%s", ext->name);
ext_count++;
ext++;