Skip to content

Commit

Permalink
Fix heap buffer overflow in de_dotdot
Browse files Browse the repository at this point in the history
  • Loading branch information
alpire committed Jun 6, 2017
1 parent 7e15761 commit c0dc63a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libhttpd.c
Expand Up @@ -2410,7 +2410,7 @@ de_dotdot( char* file )
while ( strncmp( file, "./", 2 ) == 0 )
(void) memmove( file, file + 2, strlen( file ) - 1 );
while ( ( cp = strstr( file, "/./") ) != (char*) 0 )
(void) memmove( cp, cp + 2, strlen( file ) - 1 );
(void) memmove( cp, cp + 2, strlen( cp ) - 1 );

/* Alternate between removing leading ../ and removing xxx/../ */
for (;;)
Expand Down

0 comments on commit c0dc63a

Please sign in to comment.