Initialize buffer properly...
authoraland <aland>
Tue, 19 Feb 2008 09:36:41 +0000 (09:36 +0000)
committeraland <aland>
Tue, 19 Feb 2008 09:36:41 +0000 (09:36 +0000)
src/main/event.c

index 7761f95..0d413cc 100644 (file)
@@ -2195,12 +2195,10 @@ void radius_signal_self(int flag)
                for (i = 1; i < rcode; i++) {
                        buffer[0] |= buffer[i];
                }
+       } else {
+               buffer[0] = 0;
        }
 
-#ifndef NDEBUG
-       memset(buffer + 1, 0, sizeof(buffer) - 1);
-#endif
-
        buffer[0] |= flag;
 
        write(self_pipe[1], buffer, 1);