From zas at norz.org Mon Mar 5 13:52:17 2007 From: zas at norz.org (Laurent MONIN) Date: Mon, 5 Mar 2007 21:52:17 +0100 Subject: [elinks-dev] [PATCH] charsets.c: fix gcc warning In-Reply-To: <20070227103259.GA2404@localhost.localdomain> References: <20070227103259.GA2404@localhost.localdomain> Message-ID: <20070305215217.c2e3343a.zas@norz.org> On Tue, 27 Feb 2007 13:32:59 +0300 Alexey Tourbin wrote: > Hello, > > I've got a few patches for elinks-0.11 which make it -Wall -Werror > clean against recent gcc-4.1 compiler. Some of them can be applied > to elinks-0.12, too. > > charsets.c: In function 'get_translation_table_to_utf_8': > charsets.c:274: warning: value computed is not used > charsets.c:274: warning: value computed is not used > --- > src/intl/charsets.c | 5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/src/intl/charsets.c b/src/intl/charsets.c > index d25c558..309da05 100644 > --- a/src/intl/charsets.c > +++ b/src/intl/charsets.c > @@ -269,9 +269,10 @@ get_translation_table_to_utf_8(int from) > if (from == -1) return NULL; > from &= ~SYSTEM_CHARSET_FLAG; > if (from == lfr) return utf_table; > - if (utf_table_init) > - memset(utf_table, 0, sizeof(utf_table)), > + if (utf_table_init) { > + memset(utf_table, 0, sizeof(utf_table)); > utf_table_init = 0; > + } > else > free_utf_table(); > > -- > 1.5.0.1.GIT > Thanks, committed to master branch. Kind regards, -- Zas From zas at norz.org Mon Mar 5 13:53:28 2007 From: zas at norz.org (Laurent MONIN) Date: Mon, 5 Mar 2007 21:53:28 +0100 Subject: [elinks-dev] [PATCH] user.c (save_form_data_to_file): paranoid error handling In-Reply-To: <20070227103537.GC2404@localhost.localdomain> References: <20070227103537.GC2404@localhost.localdomain> Message-ID: <20070305215328.4b00c29f.zas@norz.org> On Tue, 27 Feb 2007 13:35:37 +0300 Alexey Tourbin wrote: > This is basically to fix gcc warning: > user.c: In function 'save_form_data_to_file': > user.c:243: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result > > Now fwrite() return value must be checked. But I also noticed that > temporary file is not being freed on error conditions. And since stdio > is buffered, fclose() return value must be checked, too. > > After a few --amend's I noticed the routine does not look quite the same > anymore. > --- > src/protocol/user.c | 39 +++++++++++++++++++++++++-------------- > 1 files changed, 25 insertions(+), 14 deletions(-) > > diff --git a/src/protocol/user.c b/src/protocol/user.c > index e00cf72..fe45968 100644 > --- a/src/protocol/user.c > +++ b/src/protocol/user.c > @@ -217,32 +217,43 @@ static unsigned char * > save_form_data_to_file(struct uri *uri) > { > unsigned char *filename = get_tempdir_filename("elinks-XXXXXX"); > - int formfd; > - FILE *formfile; > + int fd; > + FILE *fp; > + unsigned char *formdata; > + size_t len, nmemb; > > if (!filename) return NULL; > > - formfd = safe_mkstemp(filename); > - if (formfd < 0) { > + fd = safe_mkstemp(filename); > + if (fd < 0) { > mem_free(filename); > return NULL; > } > > - formfile = fdopen(formfd, "w"); > - if (!formfile) { > + if (!uri->post) return filename; > + > + /* Jump the content type */ > + formdata = strchr(uri->post, '\n'); > + formdata = formdata ? formdata + 1 : uri->post; > + len = strlen(formdata); > + if (len == 0) return filename; > + > + fp = fdopen(fd, "w"); > + if (!fp) { > +error: unlink(filename); > mem_free(filename); > - close(formfd); > + close(fd); > return NULL; > } > > - if (uri->post) { > - /* Jump the content type */ > - unsigned char *formdata = strchr(uri->post, '\n'); > - > - formdata = formdata ? formdata + 1 : uri->post; > - fwrite(formdata, strlen(formdata), 1, formfile); > + nmemb = fwrite(formdata, len, 1, fp); > + if (nmemb != 1) { > + fclose(fp); > + goto error; > } > - fclose(formfile); > + > + if (fclose(fp) != 0) > + goto error; > > return filename; > } > -- > 1.5.0.1.GIT > Thanks, committed in master branch. Kind regards, -- Zas From zas at norz.org Mon Mar 5 13:54:13 2007 From: zas at norz.org (Laurent MONIN) Date: Mon, 5 Mar 2007 21:54:13 +0100 Subject: [elinks-dev] [PATCH] search.c: fix gcc warning In-Reply-To: <20070227103559.GD2404@localhost.localdomain> References: <20070227103559.GD2404@localhost.localdomain> Message-ID: <20070305215413.b04ebfec.zas@norz.org> On Tue, 27 Feb 2007 13:35:59 +0300 Alexey Tourbin wrote: > search.c: In function 'point_intersect': > search.c:828: warning: value computed is not used > search.c:828: warning: value computed is not used > --- > src/viewer/text/search.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/src/viewer/text/search.c b/src/viewer/text/search.c > index 5371688..1f3143e 100644 > --- a/src/viewer/text/search.c > +++ b/src/viewer/text/search.c > @@ -825,7 +825,10 @@ point_intersect(struct point *p1, int l1, struct point *p2, int l2) > assert(p2); > if_assert_failed return 0; > > - if (first_time) memset(hash, 0, HASH_SIZE), first_time = 0; > + if (first_time) { > + memset(hash, 0, HASH_SIZE); > + first_time = 0; > + } > > for (i = 0; i < l1; i++) hash[HASH(p1[i])] = 1; > > -- > 1.5.0.1.GIT > Thanks, committed to master branch. Kind regards, -- Zas From zas at norz.org Mon Mar 5 13:54:53 2007 From: zas at norz.org (Laurent MONIN) Date: Mon, 5 Mar 2007 21:54:53 +0100 Subject: [elinks-dev] [PATCH] textarea.c (save_textarea_file): paranoid error handling In-Reply-To: <20070227103621.GE2404@localhost.localdomain> References: <20070227103621.GE2404@localhost.localdomain> Message-ID: <20070305215453.0f610011.zas@norz.org> On Tue, 27 Feb 2007 13:36:21 +0300 Alexey Tourbin wrote: > gcc warning as follows: > textarea.c: In function 'save_textarea_file': > textarea.c:305: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result > > Check fwrite() and fclose() return values. > Also unlink temporary file on error conditions. > > This routine is now very similar to user.c:save_form_data_to_file(). > Maybe they should be factored. > --- > src/viewer/text/textarea.c | 33 +++++++++++++++++++++++++-------- > 1 files changed, 25 insertions(+), 8 deletions(-) > > diff --git a/src/viewer/text/textarea.c b/src/viewer/text/textarea.c > index bbc58dc..7e2ac2d 100644 > --- a/src/viewer/text/textarea.c > +++ b/src/viewer/text/textarea.c > @@ -292,22 +292,39 @@ static unsigned char * > save_textarea_file(unsigned char *value) > { > unsigned char *filename; > - FILE *file = NULL; > - int h; > + FILE *fp; > + int fd; > + size_t len, nmemb; > > filename = get_tempdir_filename("elinks-area-XXXXXX"); > if (!filename) return NULL; > > - h = safe_mkstemp(filename); > - if (h >= 0) file = fdopen(h, "w"); > + fd = safe_mkstemp(filename); > + if (fd < 0) { > + mem_free(filename); > + return NULL; > + } > > - if (file) { > - fwrite(value, strlen(value), 1, file); > - fclose(file); > - } else { > + len = strlen(value); > + if (len == 0) return filename; > + > + fp = fdopen(fd, "w"); > + if (!fp) { > +error: unlink(filename); > mem_free(filename); > + close(fd); > + return NULL; > + } > + > + nmemb = fwrite(value, len, 1, fp); > + if (nmemb != 1) { > + fclose(fp); > + goto error; > } > > + if (fclose(fp) != 0) > + goto error; > + > return filename; > } > > -- > 1.5.0.1.GIT > Thanks, committed to master branch. Kind regards, -- Zas From kon at iki.fi Tue Mar 6 14:33:44 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Tue, 06 Mar 2007 23:33:44 +0200 Subject: [elinks-dev] dangling pointer crash in write_to_festival (was: witekfl branch status) In-Reply-To: <20070226173548.GA905@pldmachine.fixsoftware.pl> References: <87odoj6oq1.fsf@Astalo.kon.iki.fi> <87abz2bov4.fsf@Astalo.kon.iki.fi> <20070225181435.GA16060@mail.hittsjunk.net> <20070226173548.GA905@pldmachine.fixsoftware.pl> Message-ID: <87irdekqfb.fsf_-_@Astalo.kon.iki.fi> A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://linuxfromscratch.org/pipermail/elinks-dev/attachments/20070306/e8d70c23/attachment.bin From witekfl at poczta.onet.pl Wed Mar 7 02:49:04 2007 From: witekfl at poczta.onet.pl (Witold Filipczyk) Date: Wed, 7 Mar 2007 10:49:04 +0100 Subject: [elinks-dev] dangling pointer crash in write_to_festival (was: witekfl branch status) In-Reply-To: <87irdekqfb.fsf_-_@Astalo.kon.iki.fi> References: <87odoj6oq1.fsf@Astalo.kon.iki.fi> <87abz2bov4.fsf@Astalo.kon.iki.fi> <20070225181435.GA16060@mail.hittsjunk.net> <20070226173548.GA905@pldmachine.fixsoftware.pl> <87irdekqfb.fsf_-_@Astalo.kon.iki.fi> Message-ID: <20070307094904.GA30049@pldmachine> On Tue, Mar 06, 2007 at 11:33:44PM +0200, Kalle Olavi Niemitalo wrote: > Witold Filipczyk writes: > > > This feature does not collide with screen readers. > > I just want to listen to ELinks sometimes. > > I tried applying the speech commits to master, but it crashes if, > during the speech, I close the tab and thereby cause the struct > document_view to be freed: > > (gdb) backtrace > #0 0x08115569 in write_to_festival (fest=0x81938b8) at /home/Kalle/src/elinks/src/viewer/text/festival.c:67 > #1 0x08115519 in read_from_festival (fest=0x81938b8) at /home/Kalle/src/elinks/src/viewer/text/festival.c:45 > #2 0x080ca26b in select_loop (init=0x80c8e23 ) at /home/Kalle/src/elinks/src/main/select.c:289 > #3 0x080c95af in main (argc=1, argv=0xbffc2444) at /home/Kalle/src/elinks/src/main/main.c:365 > (gdb) frame > #0 0x08115569 in write_to_festival (fest=0x81938b8) at /home/Kalle/src/elinks/src/viewer/text/festival.c:67 > 67 if (fest->line >= doc->height) > (gdb) print doc > $3 = (struct document *) 0x8 > (gdb) list > 62 int len; > 63 struct document_view *doc_view = fest->doc_view; > 64 struct document *doc = doc_view->document; > 65 struct screen_char *data; > 66 > 67 if (fest->line >= doc->height) > 68 fest->running = 0; > 69 if (!fest->running) > 70 return; > 71 > > This was with the following commits applied on top of > f2fc4020934621afb9584a468bd87180059ee8c8 (in this order): > > 4e93cbf496c82926f42c0eaf270920f126ace3f8 > 9064e6323b493b5614a9bd02c25729ce2f1650bf > f260691ac4f58e7ce0e282d7b48bddbae8f00828 > c187df9a0adcf0f9821d9b14b1dfcf43139d9bb3 > e965d07055f5dd3e046469232e4b3986fb60cbaf > 60fc3bd04fe3f85c66d1dadbc8ba4f56f576f611 > 91be2ea6b89a7514b75fa31dcba6d9a5ef6c978c > 4d7c491a22c0b9a191df363504f52f8da1c639e1 > 0da23da6b23d25ceb78f0229132d8efb9f3d3781 > > I think, before the speech code is pushed to master, one should > either > > - fix the bug. A new "document-view-delete" event might be a > clean way to do this. I reset festival.doc_view in really_close_tab. Is it acceptable? When a link is followed and the previous document was read out, the new document is read out from the line number of the previous document. How to handle this? Witek From kon at iki.fi Wed Mar 7 03:32:05 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Wed, 07 Mar 2007 12:32:05 +0200 Subject: [elinks-dev] dangling pointer crash in write_to_festival In-Reply-To: <20070307094904.GA30049@pldmachine> References: <87odoj6oq1.fsf@Astalo.kon.iki.fi> <87abz2bov4.fsf@Astalo.kon.iki.fi> <20070225181435.GA16060@mail.hittsjunk.net> <20070226173548.GA905@pldmachine.fixsoftware.pl> <87irdekqfb.fsf_-_@Astalo.kon.iki.fi> <20070307094904.GA30049@pldmachine> Message-ID: <873b4hl4yi.fsf@Astalo.kon.iki.fi> Witold Filipczyk writes: > I reset festival.doc_view in really_close_tab. Is it acceptable? I think that is too far from the code that frees the struct document_view. Even if really_close_tab currently were the only way to free a struct document_view, that could change in the future, and the person changing it would probably not remember to add a call to stop_festival. In fact, really_close_tab is already not the only way: if I navigate away from a frameset page, then a struct document_view that festival.c is using can be freed, even though really_close_tab is not called. It seems many places that free struct document_view call detach_formatted first, so you could perhaps call stop_festival From there instead. However, if we're going to assume that detach_formatted is always called before struct document_view is freed, then this should first be carefully checked, and then documented in a comment near the definition of struct document_view. > When a link is followed and the previous document was read out, > the new document is read out from the line number of the > previous document. How to handle this? detach_formatted seems to be called in that situation too, so if it's OK to stop the speech, that should fix it. By the way, the "default" in "Default speech system" is not right, because ELinks does not even try speech systems other than the one selected here. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://linuxfromscratch.org/pipermail/elinks-dev/attachments/20070307/ecf51c5c/attachment.bin From kon at iki.fi Wed Mar 7 09:07:05 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Wed, 07 Mar 2007 18:07:05 +0200 Subject: [elinks-dev] festival command injection when PIPE_BUF < 1037 Message-ID: <87tzwxjavq.fsf@Astalo.kon.iki.fi> A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://linuxfromscratch.org/pipermail/elinks-dev/attachments/20070307/5a6b9a9c/attachment.bin From kon at iki.fi Fri Mar 9 12:50:42 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Fri, 09 Mar 2007 21:50:42 +0200 Subject: [elinks-dev] festival command injection when PIPE_BUF < 1037 In-Reply-To: <87tzwxjavq.fsf@Astalo.kon.iki.fi> References: <87tzwxjavq.fsf@Astalo.kon.iki.fi> Message-ID: <87lki6i4bx.fsf@Astalo.kon.iki.fi> Witek, I see you have fixed this bug in commit 1f09c740a8207b38a475ec1375fc859b90b3a625. Please consider applying the patch at the end of this message to clarify the assumptions being made. I'm still worrying about these problems in the speech code: - Does "festival -i" enable readline-like functionality that could be used to erase the quote character before the parser sees it, and thus inject arbitrary commands again? When ELinks reads struct screen_char in order to generate a string that it will send to the terminal, it filters out control characters; doing the same here might be prudent. Of course, if festival automatically disables such functionality when its stdin is not a terminal, then such filtering is not needed, but this should be documented. - If struct screen_char contains UCS-4, write_to_festival uses only the low 8 bits. I think this clashes with the intention to make --enable-utf-8 the default in ELinks 0.12.0. The input charsets of the speech synthesizer executables are very badly documented but the espeak library apparently can autodetect between UTF-8 and the language-specific ISO-8859-*, and for festival and flite the appropriate charset depends on the voice selected in configuration files. So ELinks should have a configuration option for the speech charset, and recode to that. Because the charset conversion can change the number of bytes in the string, the MAX_LINE_LENGTH restriction may have to be implemented in a different way. After those issues have been resolved, I think the speech code can be merged, and then the following less important problems should also be fixed or at least added to bugzilla: - The document.speech.system option is documented as "Default speech system". This is wrong because ELinks never uses a non-"default" speech system. - If the speech synthesizer process dies for any reason, there should be a way to make ELinks spawn a new one. Perhaps by detecting EPIPE? Perhaps there should also be a way to let the user specify the file name of the speech synthesizer executable. I don't know though how to best prevent kiosk users from specifying arbitrary executables in an anonymous-mode ELinks. festival: Assert that writes are not short. Add comments. --- commit f6a8bcdd75e68f9153c7115edce7f3714f1a7225 tree f27156249ad0674b37bffbf2c889010032908237 parent 1f09c740a8207b38a475ec1375fc859b90b3a625 author Kalle Olavi Niemitalo Thu, 08 Mar 2007 00:33:50 +0200 committer Kalle Olavi Niemitalo Thu, 08 Mar 2007 00:33:50 +0200 src/viewer/text/festival.c | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/src/viewer/text/festival.c b/src/viewer/text/festival.c index d67bba4..a4f83cd 100644 --- a/src/viewer/text/festival.c +++ b/src/viewer/text/festival.c @@ -50,10 +50,16 @@ read_from_festival(struct fest *fest) NULL, NULL, fest); } +/* These numbers must match the documentation of the + * "document.speech.system" option. */ #define FESTIVAL_SYSTEM 0 #define FLITE_SYSTEM 1 #define ESPEAK_SYSTEM 2 +/* How many character cells to speak from each line. Because + * write_to_festival currently cannot recover from short writes, this + * must be set so low that the generated string cannot become more + * than PIPE_BUF bytes long. SUSv2 says PIPE_BUF >= 512. */ #define MAX_LINE_LENGTH 240 static void @@ -86,6 +92,8 @@ write_to_festival(struct fest *fest) data = doc->data[fest->line].chars; if (festival.speech_system == FESTIVAL_SYSTEM) { + /* The string generated here will be at most + * 10+MAX_LINE_LENGTH*2+2+1 bytes long. */ add_to_string(&buf, "(SayText \""); /* UTF-8 not supported yet. Does festival support UTF-8? */ for (i = 0; i < len; i++) { @@ -105,8 +113,29 @@ write_to_festival(struct fest *fest) } add_char_to_string(&buf, '\n'); + /* Cannot allow a short write here. It would probably cause + * an unpaired quote character to be sent to festival, + * enabling a command injection attack. If buf.length <= + * PIPE_BUF, then the write will occur either completely or + * not at all. Compare to _POSIX_PIPE_BUF instead, to ensure + * portability to systems with an unusually low PIPE_BUF. + * If this assertion fails, that means MAX_LINE_LENGTH was + * set too high. */ + assert(buf.length <= _POSIX_PIPE_BUF); + if_assert_failed { buf.length = 0; } w = safe_write(fest->out, buf.source, buf.length); if (w >= 0) { + assert(w == buf.length); + if_assert_failed { + /* The input parser of the festival process is + * now in an unknown state. */ + clear_handlers(fest->in); + close(fest->in); + fest->in = -1; + clear_handlers(fest->out); + close(fest->out); + fest->out = -1; + } if (fest->line >= doc_view->vs->y + doc_view->box.height) { move_page_down(doc_view->session, doc_view); refresh_view(doc_view->session, doc_view, 0); -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://linuxfromscratch.org/pipermail/elinks-dev/attachments/20070309/27a5658c/attachment.bin From kon at iki.fi Sat Mar 10 11:28:04 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Sat, 10 Mar 2007 20:28:04 +0200 Subject: [elinks-dev] FreeBSD tester needed for bug 939 (FSP directory listing) Message-ID: <87wt1pgdhn.fsf@Astalo.kon.iki.fi> A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://linuxfromscratch.org/pipermail/elinks-dev/attachments/20070310/15d3e59c/attachment.bin From kon at iki.fi Sun Mar 11 14:44:42 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Sun, 11 Mar 2007 23:44:42 +0200 Subject: [elinks-dev] witekfl branch status In-Reply-To: <20070226191952.GB905@pldmachine.fixsoftware.pl> References: <87odoj6oq1.fsf@Astalo.kon.iki.fi> <87abz2bov4.fsf@Astalo.kon.iki.fi> <20070226191952.GB905@pldmachine.fixsoftware.pl> Message-ID: <87tzwrbgl1.fsf@Astalo.kon.iki.fi> A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://linuxfromscratch.org/pipermail/elinks-dev/attachments/20070311/192bda55/attachment.bin From kon at iki.fi Mon Mar 12 01:03:39 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Mon, 12 Mar 2007 09:03:39 +0200 Subject: [elinks-dev] witekfl branch status In-Reply-To: <87tzwrbgl1.fsf@Astalo.kon.iki.fi> References: <87odoj6oq1.fsf@Astalo.kon.iki.fi> <87abz2bov4.fsf@Astalo.kon.iki.fi> <20070226191952.GB905@pldmachine.fixsoftware.pl> <87tzwrbgl1.fsf@Astalo.kon.iki.fi> Message-ID: <87r6rvj644.fsf@Astalo.kon.iki.fi> A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://linuxfromscratch.org/pipermail/elinks-dev/attachments/20070312/ff22c33e/attachment.bin From kon at iki.fi Wed Mar 14 23:09:45 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Thu, 15 Mar 2007 07:09:45 +0200 Subject: [elinks-dev] witekfl branch status In-Reply-To: <20070226191952.GB905@pldmachine.fixsoftware.pl> References: <87odoj6oq1.fsf@Astalo.kon.iki.fi> <87abz2bov4.fsf@Astalo.kon.iki.fi> <20070226191952.GB905@pldmachine.fixsoftware.pl> Message-ID: <87hcsn8546.fsf@Astalo.kon.iki.fi> A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://linuxfromscratch.org/pipermail/elinks-dev/attachments/20070315/bade748f/attachment.bin From witekfl at poczta.onet.pl Thu Mar 15 11:44:07 2007 From: witekfl at poczta.onet.pl (Witold Filipczyk) Date: Thu, 15 Mar 2007 18:44:07 +0100 Subject: [elinks-dev] witekfl branch status In-Reply-To: <87hcsn8546.fsf@Astalo.kon.iki.fi> References: <87odoj6oq1.fsf@Astalo.kon.iki.fi> <87abz2bov4.fsf@Astalo.kon.iki.fi> <20070226191952.GB905@pldmachine.fixsoftware.pl> <87hcsn8546.fsf@Astalo.kon.iki.fi> Message-ID: <20070315174407.GA2892@pldmachine.fixsoftware.pl> On Thu, Mar 15, 2007 at 07:09:45AM +0200, Kalle Olavi Niemitalo wrote: > Witold Filipczyk writes: > > > On Sun, Feb 25, 2007 at 10:52:47AM +0200, Kalle Olavi Niemitalo wrote: > >> acckey This seems to fix a bug; please advise how to reproduce the bug. > > > > > > Start > > > > > > > > And ALT-A doesn't work. > > I saved that HTML in a file and opened it with ELinks 0.12.GIT > (026e56d539099477043e499b1a7227c5a67e200f) running with the > English language. I have bound move-cursor-{down,left,right,up} > to {j,h,l,k}. My document.browse.accesskey.priority setting is 1. > > I moved the cursor down from the link and pressed Alt+a. The > cursor jumped back to the first character "S" of the link. I > pressed Alt+a again; this did nothing. I moved the cursor three > steps to the right, to the "r", and pressed Alt+a once more; this > did nothing either. I again moved the cursor down and pressed > Alt+A (note capital A). This did nothing. > > I then tested c2d1952a082e2ed51dbfb6895f29c0869a89a8a3 from the > witekfl branch in the same way. The only difference I could see > was that in this version, when the cursor was already on some > character of the link, pressing Alt+a moved it to the beginning > of the link, rather than left it in place as in master. Is this > the bug you were fixing? Set document.browse.accesskey.auto-follow to 1 and try again. From kon at iki.fi Sun Mar 18 13:12:23 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Sun, 18 Mar 2007 21:12:23 +0200 Subject: [elinks-dev] witekfl branch status Message-ID: <87bqiqnz6w.fsf@Astalo.kon.iki.fi> A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://linuxfromscratch.org/pipermail/elinks-dev/attachments/20070318/a134c451/attachment.bin From witekfl at poczta.onet.pl Thu Mar 22 12:25:47 2007 From: witekfl at poczta.onet.pl (Witold Filipczyk) Date: Thu, 22 Mar 2007 19:25:47 +0100 Subject: [elinks-dev] witekfl branch status In-Reply-To: <87bqiqnz6w.fsf@Astalo.kon.iki.fi> References: <87bqiqnz6w.fsf@Astalo.kon.iki.fi> Message-ID: <20070322182547.GA29307@pldmachine.fixsoftware.pl> On Sun, Mar 18, 2007 at 09:12:23PM +0200, Kalle Olavi Niemitalo wrote: > bug620 This resets forms when I resize the window. Not acceptable. It's difficult because it should be done only once when the document is fully loaded after reloading, but the user might type something into forms earlier. How to do that? > > bug629 This gives users an incentive to enable ECMAScript support, > which currently has bug 755, which can crash ELinks and may be > exploitable for worse effects. I think that should be fixed > before any new ECMAScript features are added. I committed "delayed submitting forms". I hope this help. > decompr This sets conn->stream_pipes_written = 0 after read_encoded > returns > 0. But read_encoded is not guaranteed to read all > the data from the pipe. So the comment in struct connection > is not accurate. Yes, It hung with bzip2. > > delay delayed_goto_uri, apparently prevents some internal errors > with copiousoutput, but I haven't yet examined why. > More importantly, delayed_open.ses may become a dangling > pointer if the tab is closed before the bottom half gets > to run. One possible fix might be to define a struct > weak_session that has a reference count, bidirectionally link > that with struct session, and tear down the link when the > struct session is freed. Furthermore, the return value from > register_bottom_half should be checked. I don't believe it. Show me a recipe to crash ELinks with copiousoutput. > > In the long term, I'd like to have the copiousoutput code > rewritten as an encoding-like layer, so that it can stream > data to the viewer as it comes from the network. This is less > important than the SGML/DOM integration though. > > epoll I don't think this should be merged. > If ELinks has to keep supporting select() too, I think the > maintenance burden outweighs any advantages epoll may have. > It may be faster; but I don't believe the speedup is > noticeable in practice. It is not limited by FD_SETSIZE; > but threads[] still has that limit. This is the only code that works fine. > > merged These have already been merged to master. > > revertw These have been reverted in the witekfl branch or revert > commits that won't be merged. > > spaces2 Security risk; see Debian bugs 90483 and 221717. > If the % does not already have apostrophes around it, this > quotes the file name with add_shell_quoted_to_string; else, > this adds the file name as is. In the latter case, if there > are apostrophes in the file name too and backquotes between > them, arbitrary programs can be executed without the user > knowing. If ELinks used add_shell_safe_to_string instead of > substituting the file name directly, then it still wouldn't > handle spaces correctly on Debian, but I think it would be > good enough. So? > > speech Test backspaces and add a charset option before merging. > write_to_festival now recodes text to the terminal I/O > charset. I think it will be very common to use UTF-8 I/O with > the terminal but an ISO-8859-based voice with Festival, and > write_to_festival currently does not support that combination. > Also, it should check for SCREEN_ATTR_FRAME. Frame chars are ignored. I'm too lazy to do the rest. > ? 2007-03-15 6605f4c471a8b2a1408552a4fdd34b2798756558 read_special: s/foreachback/foreach/ add_to_list adds to the beginning of the list, so the foreach will find faster than the foreachback. > ? 2007-03-14 823c26748a9b6ade0bbcfa9950e8daadb0cc9acf delayed_goto_uri: Do not segfault when there is no location yet. ELinks crashed when run with the 'copiousoutput' file from the command line. > ? 2007-03-14 82a408da280a3e7a05975d28a9b0701e76688396 read_special: Added no-cache. Without this was the memleak and fds of popen_data weren't closed. > ? 2007-03-14 fbc51b399113224bc0247c9ef6ea773cc06ea12a read_special: reorganization of code. > ? 2007-03-13 b9c409c3b9ea2ae01797c192f0ebda524577d7db I forgot about conn->popen. > ? 2007-03-13 7ab5b8d57ecfe0e25e6185ec85304003e5c02024 copiousoutput: Allow read only registered file descriptors. Reading from any /dev/fd/* may hang ELinks eg. from /dev/fd/0, so only fds of the 'copiousoutput' are used. BTW, whether reading of /dev/zero should be allowed? > ? 2007-03-13 a494f376f998e69e92125e8f13b9147e37b55799 copiousoutput: Use current frame. Frames are used where they appears. > ? 2007-03-13 b6e862f539c6181dacee921ee7120aee76f83245 forms: allow submit empty forms This and delayed_submit_forms let me get to my bank account. > bug629 2007-03-13 bd0aa20c9c10c5073291a9bd99cddf883bb7857b Grammar. > spaces2 2007-03-12 6a77f68c63497b518b07fb449984d018f02030db mime: Check whether % is enclosed by apostrophes > bug629 2007-03-12 8b900203b771798f6caf67cfbacdfc50f3bbc4b7 test: onchange.html adjusted to the ELinks > bug629 2007-03-12 0f58529b7dfdf558790416260c07a15b4e2e92dc ecmascript: Added onchange hook for SELECT. > bug629 2007-03-12 95b5e67bd91087458ce7ca916caff02139279d95 The test case for the onChange event. > speech 2007-03-12 d008728ab047a637b41f8654189dcfebe8679ae0 festival: Drop MAX_LINE_LENGTH > speech 2007-03-12 9eb1c751ed6ee83d8d8f151a875702828934ea20 configure.in: show espeak in features.log > merged 2007-03-12 c4500039b2b97564454cc45af0d55bef66b6d350 get_attr_value: do not do trim_chars > bug620 2007-03-11 ede61c1222bb7086338c3f709c5f75bb768a0ddf Reset forms after reloading a document. > speech 2007-03-10 9362dfb9ae444acbb3c214670f13acb218efa1e8 festival: Use the terminal codepage for the speech output. > speech 2007-03-10 094b75d5acbae684a2551f8b6993efb26423f77c festival: there is no default speech synthesis engine. > speech 2007-03-08 44852d9cba30709eeb00d2320fb2300a2efaff96 festival: Assert that writes are not short. Add comments. > ? 2007-03-09 c09cc0398fb1c10c99076524782eee6c1e45fcef fsp: download resuming > ? 2007-03-09 967a15b7f4427dc94ddd9fe1092f6a20104caa2a smb: download resuming When one aborts dowload, may resume it later. It works for http and ftp, why not do it for fsp and smb? From kon at iki.fi Thu Mar 22 15:16:35 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Thu, 22 Mar 2007 23:16:35 +0200 Subject: [elinks-dev] witekfl branch status In-Reply-To: <20070322182547.GA29307@pldmachine.fixsoftware.pl> References: <87bqiqnz6w.fsf@Astalo.kon.iki.fi> <20070322182547.GA29307@pldmachine.fixsoftware.pl> Message-ID: <871wjht1vw.fsf@Astalo.kon.iki.fi> A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://linuxfromscratch.org/pipermail/elinks-dev/attachments/20070322/50ba14ca/attachment.bin From kon at iki.fi Thu Mar 22 16:49:28 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Fri, 23 Mar 2007 00:49:28 +0200 Subject: [elinks-dev] do_smb if auth->password contains '@' or '/'? Message-ID: <87wt18sxl3.fsf@Astalo.kon.iki.fi> A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://linuxfromscratch.org/pipermail/elinks-dev/attachments/20070323/663e8092/attachment.bin From kon at iki.fi Sat Mar 24 06:49:08 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Sat, 24 Mar 2007 14:49:08 +0200 Subject: [elinks-dev] do_smb if auth->password contains '@' or '/'? In-Reply-To: <87wt18sxl3.fsf@Astalo.kon.iki.fi> References: <87wt18sxl3.fsf@Astalo.kon.iki.fi> Message-ID: <877it63iyj.fsf@Astalo.kon.iki.fi> A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://linuxfromscratch.org/pipermail/elinks-dev/attachments/20070324/877a7640/attachment.bin From kon at iki.fi Sun Mar 25 14:23:30 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Sun, 25 Mar 2007 23:23:30 +0300 Subject: [elinks-dev] witekfl branch status In-Reply-To: <20070322182547.GA29307@pldmachine.fixsoftware.pl> References: <87bqiqnz6w.fsf@Astalo.kon.iki.fi> <20070322182547.GA29307@pldmachine.fixsoftware.pl> Message-ID: <87y7ll1399.fsf@Astalo.kon.iki.fi> A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://linuxfromscratch.org/pipermail/elinks-dev/attachments/20070325/30429719/attachment.bin From witekfl at poczta.onet.pl Mon Mar 26 11:25:47 2007 From: witekfl at poczta.onet.pl (Witold Filipczyk) Date: Mon, 26 Mar 2007 19:25:47 +0200 Subject: [elinks-dev] witekfl branch status In-Reply-To: <87y7ll1399.fsf@Astalo.kon.iki.fi> References: <87bqiqnz6w.fsf@Astalo.kon.iki.fi> <20070322182547.GA29307@pldmachine.fixsoftware.pl> <87y7ll1399.fsf@Astalo.kon.iki.fi> Message-ID: <20070326172547.GA9414@pldmachine.fixsoftware.pl> On Sun, Mar 25, 2007 at 11:23:30PM +0300, Kalle Olavi Niemitalo wrote: > Witold Filipczyk writes: > > > On Sun, Mar 18, 2007 at 09:12:23PM +0200, Kalle Olavi Niemitalo wrote: > >> bug620 This resets forms when I resize the window. Not acceptable. > > It's difficult because it should be done only once when the document is > > fully loaded after reloading, but the user might type something into forms > > earlier. > > How to do that? > > Why must the forms be reset only after the document is fully > loaded? I think it would be simplest to discard all form-related > information immediately in reload(), before even requesting the > file from the server, and let the renderer then incrementally > rebuild the data, as if loading the document for the first time. > I am however not familiar with this code, and it seems I'll need > a diagram to properly understand all of the pointers between its > different structures. You are right!