patch-src_detection-plugins_sp_ip_tos_check_c 987 B

1234567891011121314151617181920212223242526
  1. --- snort-2.8.5.2.orig/src/detection-plugins/sp_ip_tos_check.c 2009-05-07 00:28:33.000000000 +0200
  2. +++ snort-2.8.5.2/src/detection-plugins/sp_ip_tos_check.c 2010-01-19 19:58:18.000000000 +0100
  3. @@ -191,19 +191,19 @@ void ParseIpTos(char *data, OptTreeNode
  4. ds_ptr->not_flag = 1;
  5. }
  6. - if(index(data, (int) 'x') == NULL && index(data, (int)'X') == NULL)
  7. + if(strchr(data, (int) 'x') == NULL && strchr(data, (int)'X') == NULL)
  8. {
  9. ds_ptr->ip_tos = atoi(data);
  10. }
  11. else
  12. {
  13. - if(index(data,(int)'x'))
  14. + if(strchr(data,(int)'x'))
  15. {
  16. - ds_ptr->ip_tos = (u_char) strtol((index(data, (int)'x')+1), NULL, 16);
  17. + ds_ptr->ip_tos = (u_char) strtol((strchr(data, (int)'x')+1), NULL, 16);
  18. }
  19. else
  20. {
  21. - ds_ptr->ip_tos = (u_char) strtol((index(data, (int)'X')+1), NULL, 16);
  22. + ds_ptr->ip_tos = (u_char) strtol((strchr(data, (int)'X')+1), NULL, 16);
  23. }
  24. }