Ver Fonte

Safety memset when creating error information for a new thread.

Ryan C. Gordon há 24 anos atrás
pai
commit
3be0550a6c
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      physfs.c

+ 1 - 0
physfs.c

@@ -138,6 +138,7 @@ void __PHYSFS_setError(const char *str)
         if (err == NULL)
             return;   /* uhh...? */
 
+        memset((void *) err, '\0', sizeof (ErrMsg));
         err->tid = __PHYSFS_platformGetThreadID();
         err->next = errorMessages;
         errorMessages = err;