Changeset 447

Show
Ignore:
Timestamp:
03/30/06 01:45:26 (3 years ago)
Author:
common
Message:

shellcode-signatures
- add strndup to parser.y to have strndup on freebsd

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nepenthes/trunk/modules/shellcode-signatures/parser.y

    r436 r447  
    253253 
    254254%% 
     255 
     256#ifndef HAVE_STRNDUP 
     257 // from http://www.unixpapa.com/incnote/string.html 
     258 char *strndup(const char *str, size_t len) 
     259 { 
     260     char *dup= (char *)malloc( len+1 ); 
     261     if (dup) { 
     262         strncpy(dup,str,len); 
     263         dup[len]= '\0'; 
     264     } 
     265     return dup; 
     266  } 
     267#endif /* HAVE_STRNDUP */ 
     268 
    255269 
    256270struct sc_shellcode *init_shellcode()