Fix off-by-one error in launch_other_browser
[browser-switch] / launcher.c
index d9fa584..24dff0a 100644 (file)
@@ -154,7 +154,7 @@ static void launch_other_browser(struct swb_context *ctx, char *uri) {
 
                        /* Move the string after the ', including the \0,
                           over two chars */
 
                        /* Move the string after the ', including the \0,
                           over two chars */
-                       memmove(quote+3, quote+1, strlen(quote)+1);
+                       memmove(quote+3, quote+1, strlen(quote));
                        memcpy(quote, "%27", 3);
                        quote = quote + 3;
                }
                        memcpy(quote, "%27", 3);
                        quote = quote + 3;
                }