Fix mvcp_util_strip() using strcpy() on overlapping strings.
authorDan Dennedy <dan@dennedy.org>
Tue, 9 Nov 2010 05:10:34 +0000 (21:10 -0800)
committerDan Dennedy <dan@dennedy.org>
Tue, 9 Nov 2010 05:10:34 +0000 (21:10 -0800)
src/mvcp/mvcp_util.c

index 39d7936..826f831 100644 (file)
@@ -71,7 +71,7 @@ char *mvcp_util_strip( char *input, char value )
                if ( ptr != NULL )
                        *ptr = '\0';
                if ( input[ 0 ] == value )
-                       strcpy( input, input + 1 );
+                       memmove( input, input + 1, strlen( input ) );
        }
        return input;
 }