Skip to content

Commit 0fe0787

Browse files
committed
Merge pull request #608 from NickSampanis/608
Fix cvs ignore end checking
2 parents ce3858f + 6b196e0 commit 0fe0787

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dissectors/ec_cvs.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,16 @@ FUNC_DECODER(dissector_cvs)
9696
/* move over the cvsroot path */
9797
ptr += strlen(CVS_LOGIN) + 1;
9898

99+
if (ptr >= end)
100+
return NULL;
99101
/* go until \n */
100102
while(*ptr != '\n' && ptr != end) ptr++;
101103
if (ptr == end) return NULL;
102-
103104
PACKET->DISSECTOR.user = strdup((const char*)++ptr);
104105

105106
/* cut the username on \n */
106107
if ( (p = strchr(PACKET->DISSECTOR.user, '\n')) != NULL )
107108
*p = '\0';
108-
109109
/* go until \n */
110110
while(*ptr != '\n' && ptr != end) ptr++;
111111
if (ptr == end) return NULL;

0 commit comments

Comments
 (0)