projects
/
ossec-hids.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 2.7
[ossec-hids.git]
/
src
/
os_regex
/
os_regex_strbreak.c
diff --git
a/src/os_regex/os_regex_strbreak.c
b/src/os_regex/os_regex_strbreak.c
index
2294c2c
..
e6905c0
100755
(executable)
--- a/
src/os_regex/os_regex_strbreak.c
+++ b/
src/os_regex/os_regex_strbreak.c
@@
-24,7
+24,7
@@
char **OS_StrBreak(char match, char *str, int size)
{
int count = 0;
int i = 0;
{
int count = 0;
int i = 0;
-
+
char *tmp_str = str;
char **ret;
char *tmp_str = str;
char **ret;
@@
-40,7
+40,7
@@
char **OS_StrBreak(char match, char *str, int size)
/* Memory error. Should provice a better way to detect it */
return(NULL);
}
/* Memory error. Should provice a better way to detect it */
return(NULL);
}
-
+
/* Allocating memory to null */
while(i <= size)
{
/* Allocating memory to null */
while(i <= size)
{
@@
-62,13
+62,13
@@
char **OS_StrBreak(char match, char *str, int size)
goto error;
}
goto error;
}
- /* Copying the string */
+ /* Copying the string */
ret[count][i-1] = '\0';
strncpy(ret[count],tmp_str,i-1);
tmp_str = ++str;
count++;
ret[count][i-1] = '\0';
strncpy(ret[count],tmp_str,i-1);
tmp_str = ++str;
count++;
- i=0;
+ i=0;
continue;
}
continue;
}