patch-src_detection-plugins_sp_replace_c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --- snort-2.8.5.1.orig/src/detection-plugins/sp_replace.c 2009-07-07 17:37:04.000000000 +0200
  2. +++ snort-2.8.5.1/src/detection-plugins/sp_replace.c 2009-12-27 17:23:47.000000000 +0100
  3. @@ -111,7 +111,7 @@ static PatternMatchData * Replace_Parse(
  4. file_name, file_line);
  5. }
  6. /* clear out the temp buffer */
  7. - bzero(tmp_buf, MAX_PATTERN_SIZE);
  8. + memset(tmp_buf, 0, MAX_PATTERN_SIZE);
  9. while(isspace((int)*rule))
  10. rule++;
  11. @@ -122,7 +122,7 @@ static PatternMatchData * Replace_Parse(
  12. }
  13. /* find the start of the data */
  14. - start_ptr = index(rule, '"');
  15. + start_ptr = strchr(rule, '"');
  16. if(start_ptr == NULL)
  17. {
  18. @@ -163,7 +163,7 @@ static PatternMatchData * Replace_Parse(
  19. dummy_end = (dummy_idx + size);
  20. /* why is this buffer so small? */
  21. - bzero(hex_buf, 3);
  22. + memset(hex_buf, 0, 3);
  23. memset(hex_buf, '0', 2);
  24. /* BEGIN BAD JUJU..... */
  25. @@ -269,7 +269,7 @@ static PatternMatchData * Replace_Parse(
  26. strtol(hex_buf, (char **) NULL, 16)&0xFF;
  27. dummy_size++;
  28. - bzero(hex_buf, 3);
  29. + memset(hex_buf, 0, 3);
  30. memset(hex_buf, '0', 2);
  31. }
  32. else