sizeof(int) != sizeof(size_t). (Matthias Andree)
* Nalin Dahyabhai's fix for driver.c to not call the private Kerberos
krb5_init_ets() function. Sent by Miloslav Trmac. (Matthias Andree)
+* Nalin Dahyabhai's fix for sink.c/transact.c to reserve sufficient
+ space for \r\n trailers in snprintf calls. Sent by Miloslav Trmac,
+ possibly fixing Red Hat bug #114470. (Matthias Andree).
fetchmail-6.2.5 (Wed Oct 15 18:39:22 EDT 2003), 23079 lines:
#else
va_start(ap);
#endif
- vsnprintf(buf, sizeof(buf), fmt, ap);
+ vsnprintf(buf, sizeof(buf) - 2, fmt, ap);
va_end(ap);
snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "\r\n");
va_list ap;
if (protocol->tagged && !suppress_tags)
- (void) sprintf(buf, "%s ", GENSYM);
+ snprintf(buf, sizeof(buf) - 2, "%s ", GENSYM);
else
buf[0] = '\0';
#else
va_start(ap);
#endif
- vsnprintf(buf + strlen(buf), sizeof(buf)-strlen(buf), fmt, ap);
+ vsnprintf(buf + strlen(buf), sizeof(buf)-2-strlen(buf), fmt, ap);
va_end(ap);
snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "\r\n");
phase = SERVER_WAIT;
if (protocol->tagged && !suppress_tags)
- (void) sprintf(buf, "%s ", GENSYM);
+ snprintf(buf, sizeof(buf) - 2, "%s ", GENSYM);
else
buf[0] = '\0';
#else
va_start(ap);
#endif
- vsnprintf(buf + strlen(buf), sizeof(buf)-strlen(buf), fmt, ap);
+ vsnprintf(buf + strlen(buf), sizeof(buf)-2-strlen(buf), fmt, ap);
va_end(ap);
snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "\r\n");