summaryrefslogtreecommitdiff
path: root/package/snort/patches/patch-src_detection-plugins_sp_tcp_win_check_c
blob: 6433539c71343dcfaf010732f3e4f3f70123da86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- snort-2.8.5.1.orig/src/detection-plugins/sp_tcp_win_check.c	2009-05-07 00:28:39.000000000 +0200
+++ snort-2.8.5.1/src/detection-plugins/sp_tcp_win_check.c	2009-12-27 16:11:37.000000000 +0100
@@ -196,19 +196,19 @@ void ParseTcpWin(char *data, OptTreeNode
         ds_ptr->not_flag = 1;
     }
 
-    if(index(data, (int) 'x') == NULL && index(data, (int)'X') == NULL)
+    if(strchr(data, (int) 'x') == NULL && strchr(data, (int)'X') == NULL)
     {
         win_size = atoi(data);
     }
     else
     {
-        if(index(data,(int)'x'))
+        if(strchr(data,(int)'x'))
         {
-            win_size = (uint16_t) strtol((index(data, (int)'x')+1), NULL, 16);
+            win_size = (uint16_t) strtol((strchr(data, (int)'x')+1), NULL, 16);
         }
         else
         {
-            win_size = (uint16_t) strtol((index(data, (int)'X')+1), NULL, 16);
+            win_size = (uint16_t) strtol((strchr(data, (int)'X')+1), NULL, 16);
         }
     }