projects
/
uzbl-mobile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eacd934
)
make check for html_end_marker safe
author
Robert Manea
<gotmor@gmail.com>
Wed, 27 May 2009 14:00:30 +0000
(16:00 +0200)
committer
Robert Manea
<gotmor@gmail.com>
Wed, 27 May 2009 14:00:30 +0000
(16:00 +0200)
uzbl.c
patch
|
blob
|
history
diff --git
a/uzbl.c
b/uzbl.c
index
0fc5911
..
ba6655a
100644
(file)
--- a/
uzbl.c
+++ b/
uzbl.c
@@
-1471,9
+1471,13
@@
static void
parse_cmd_line(const char *ctl_line) {
gchar **tokens = NULL;
Behaviour *b = &uzbl.behave;
parse_cmd_line(const char *ctl_line) {
gchar **tokens = NULL;
Behaviour *b = &uzbl.behave;
+ size_t len=0;
if(b->mode == M_HTML) {
if(b->mode == M_HTML) {
- if(!strncmp(b->html_endmarker, ctl_line, strlen(b->html_endmarker))) {
+ len = strlen(b->html_endmarker);
+ /* ctl_line has trailing '\n' so we check for strlen(ctl_line)-1 */
+ if(len == strlen(ctl_line)-1 &&
+ !strncmp(b->html_endmarker, ctl_line, len)) {
set_timeout(0);
set_var_value("mode", "0");
render_html();
set_timeout(0);
set_var_value("mode", "0");
render_html();