windows-avoid-rwevent-collision-part-two-20090121
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 21 Jan 2009 21:04:11 +0000 (21:04 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 21 Jan 2009 21:04:11 +0000 (21:04 +0000)
LICENSE MIT

don't leave out the size of the buffer.

src/WINNT/afsd/smb.c

index ea00dc7..0e0cdc4 100644 (file)
@@ -8800,7 +8800,7 @@ void smb_Server(VOID *parmp)
                     EVENT_HANDLE rwevent;
                     char eventName[MAX_PATH];
 
-                    snprintf(eventName, "smb_Server() rwevent %d", myIdx);
+                    snprintf(eventName, MAX_PATH, "smb_Server() rwevent %d", myIdx);
                     rwevent = thrd_CreateEvent(NULL, FALSE, FALSE, eventName);
                     if ( GetLastError() == ERROR_ALREADY_EXISTS )
                         osi_Log1(smb_logp, "Event Object Already Exists: %s", osi_LogSaveString(smb_logp, eventName));