1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-30 03:26:23 -04:00
Commit Graph

16 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
a2404407ce Fix double-free crash if EOF immediately follows </MAP>.
look_for_link() used to return 0 both when it found the closing </MAP>
tag, and when it hit the end of the file.  In the first case, it also
added *menu to the memory_list; in the second case, it did not.  The
caller get_image_map() supposedly distinguished between these cases by
checking whether pos >= eof, and freed *menu separately if so.

However, if the </MAP> was at the very end of the HTML file, so that
not even a newline followed it, then look_for_link() left pos == eof
even though it had found the </MAP> and added *menu to the memory_list.
This made get_image_map() misinterpret the result and mem_free(*menu)
even though *menu had already been freed as part of the memory_list;
thus the crash.

To fix this, make look_for_link() return -1 instead of 0 if it hits
EOF without finding the </MAP>.  Then make get_image_map() check the
return value instead of comparing pos to eof.  And add a test case,
although not an automated one.

Alternatively, look_for_link() could have been changed to decrement
pos between finding the </MAP> and returning 0.  Then, the pos >= eof
comparison in get_image_map() would have been false.  That scheme
would however have been a bit more difficult to understand and
maintain, I think.

Reported by Paul B. Mahol.
2008-12-31 20:06:49 +00:00
Kalle Olavi Niemitalo
faebee18d1 Remove unclearly licensed test files.
test/align.html: from www.czech-tv.cz
test/css/idnes_mail.html: apparently from idnes.cz
test/erreurs_en.htm: unclear origin
test/javascript_broken.html: presumably from www.hotjobs.com
test/poocs.net.html: presumably from poocs.net

I did not find in the source tree a licence to distribute any of these.
(cherry picked from commit 22975bb0ec)
2008-10-03 10:56:05 +03:00
Kalle Olavi Niemitalo
983419b606 test/optgroup.html is under GNU Free Documentation License
test/optgroup.html was added on 2004-04-17 with no comment about licensing.
I contacted the author via <http://iccl.fi/feedback.cgi?id=mail>, asking
for a licence.  The author noted that a developer of ELinks had originally
asked on the #debian.fi channel whether the file could be used, and he had
allowed it then.  That permission grant had not been recorded in the source
tree though, and it is not clear whether modification had been allowed.
Anyway, the author now explicitly grants us the GNU free documentation
licence on this file, and is willing to consider other licences.
(cherry picked from commit fe78a0249a)
2008-09-28 22:00:35 +03:00
Witold Filipczyk
9470cbbc1e test, CGI: added a simple form to test CGI.
[ From commit 1b0bad8cbc in ELinks
  0.12.GIT.  --KON ]
2007-07-02 22:50:33 +03:00
Kalle Olavi Niemitalo
a8fd05b401 SMJS: Fix error "forms.namedItem is not a function".
Commit 63752c854b303f5f58636a512a137bf3702e051b on 2004-12-27
seems to have broken this.

[ From commit c9b2fbbd46 in ELinks
  0.12.GIT.  --KON ]
2007-07-02 22:49:09 +03:00
Jonas Fonseca
45ccd0f0c9 Add a stupid test script to print CGI variables set by ELinks
To use it to test whether that CGI works put the following in your
elinks.conf:

      set protocol.file.cgi.policy = 1
      set protocol.file.cgi.path = "/path/to/elinks/test/cgi"

Then point ELinks to the print-vars.sh script inside the CGI test directory
in the ELinks source directory.
2006-11-30 16:25:49 +01:00
Laurent MONIN
02cbb8f8b5 Add a css media test file (see bug 722). 2006-01-29 10:27:56 +01:00
Jonas Fonseca
c613339b45 Check if the test 'trash' directory could be entered
Original patch by Alex Riesen <raa.lkml@gmail.com> for GIT.
2006-01-10 15:48:33 +01:00
Jonas Fonseca
b52baed88f Move src/dom/test/libtest test/libtest.sh, put path to it in TEST_LIB 2006-01-10 14:05:58 +01:00
Jonas Fonseca
9a0bf83756 Add basic stuff for XBEL parsing/highlighting using the DOM engine 2005-12-30 22:19:32 +01:00
Jonas Fonseca
66248849cd Add an RSS test file 2005-12-30 22:18:22 +01:00
Laurent MONIN
0fed31e6bd Add a file for script types testing. 2005-11-02 16:55:15 +01:00
Laurent MONIN
80af673860 More sub/sup tests. 2005-10-19 23:05:41 +02:00
Petr Baudis
06ea255a22 Convert part of the build to the new build system
The root makefile is converted as well as some leaf Makefiles. This
also brings in the required infrastructure and adjusts configure.in
appropriately.

I converted only makefiles containing no configurable stuff, since
that'll require more consideration yet.
2005-09-15 21:03:56 +02:00
Jonas Fonseca
7462f22635 Remove now obsolete .cvsignore files. 2005-09-15 18:33:20 +02:00
Petr Baudis
0f6d4310ad Initial commit of the HEAD branch of the ELinks CVS repository, as of
Thu Sep 15 15:57:07 CEST 2005. The previous history can be added to this
by grafting.
2005-09-15 15:58:31 +02:00