Sfoglia il codice sorgente

Safety memset when creating error information for a new thread.

Ryan C. Gordon 25 anni fa
parent
commit
3be0550a6c
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  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;