[pisa-src] r1686 - trunk/pisasd/sdconf.c

  • From: Mircea Gherzan <mircea.gherzan@xxxxxxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Fri, 13 Nov 2009 13:07:44 +0100

Author: gherzan
Date: Fri Nov 13 13:07:44 2009
New Revision: 1686

Log:
pisasd: fix a sizeof-related bug

Don't zero out *only* the first 4/8 bytes of the config structure.

Modified:
   trunk/pisasd/sdconf.c

Modified: trunk/pisasd/sdconf.c
==============================================================================
--- trunk/pisasd/sdconf.c       Fri Nov 13 12:42:42 2009        (r1685)
+++ trunk/pisasd/sdconf.c       Fri Nov 13 13:07:44 2009        (r1686)
@@ -35,7 +35,7 @@
  */
 void sdconf_init(void)
 {
-       memset(&sd_cfg, 0, sizeof(&sd_cfg));
+       memset(&sd_cfg, 0, sizeof(sd_cfg));
        memset(authorized_cfg_file, 0, sizeof(authorized_cfg_file));
 }
 

Other related posts:

  • » [pisa-src] r1686 - trunk/pisasd/sdconf.c - Mircea Gherzan