Changeset 4640:a115f3ac3b62 for lib.c

Show
Ignore:
Timestamp:
2006-05-18 10:35:29 (3 years ago)
Author:
Rocco Rutte <pdmef@…>
Branch:
HEAD
Message:

Avoid safe_free() usage and add security checks

Add checks to check_sec.sh for memory functions.

These include a check for use of safe_free() instead of FREE() and a
check whether FREE(&...) is used.

For the former, SAFE_FREE_CHECKED is to be used, for the latter
FREE_CHECKED to avoid messages from check_sec.sh

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lib.c

    r4343 r4640  
    186186} 
    187187 
    188 void safe_free (void *ptr) 
     188void safe_free (void *ptr)      /* __SAFE_FREE_CHECKED__ */ 
    189189{ 
    190190  void **p = (void **)ptr; 
     
    261261void mutt_str_replace (char **p, const char *s) 
    262262{ 
    263   FREE (p); 
     263  FREE (p);             /* __FREE_CHECKED__ */ 
    264264  *p = safe_strdup (s); 
    265265}