chiark
/
gitweb
/
~mdw
/
secnet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
integer and buffer overflows: introduce a number of asserts
[secnet]
/
log.c
diff --git
a/log.c
b/log.c
index 837ed55acf8c9530a2e4d9f4e87feec3b433449e..55f1ee125cbfba848002f1c536e8ad89e3bb3247 100644
(file)
--- a/
log.c
+++ b/
log.c
@@
-25,6
+25,7
@@
static void vMessage(uint32_t class, const char *message, va_list args)
if (secnet_is_daemon) {
/* Messages go to the system log interface */
bp=strlen(buff);
if (secnet_is_daemon) {
/* Messages go to the system log interface */
bp=strlen(buff);
+ assert(bp < MESSAGE_BUFLEN);
vsnprintf(buff+bp,MESSAGE_BUFLEN-bp,message,args);
/* Each line is sent separately */
while ((nlp=strchr(buff,'\n'))) {
vsnprintf(buff+bp,MESSAGE_BUFLEN-bp,message,args);
/* Each line is sent separately */
while ((nlp=strchr(buff,'\n'))) {