--- lynx-2.8.5.orig/WWW/Library/Implementation/HTMIME.c +++ lynx-2.8.5/WWW/Library/Implementation/HTMIME.c @@ -2230,7 +2230,7 @@ strcpy(t, s); return 1; } - for (p = buf; *s; ) { + for (p = buf; *s && p < buf + LINE_LENGTH - 8; ) { if (!kanji && s[0] == '$' && (s[1] == '@' || s[1] == 'B')) { if (HTmaybekanji((int)s[2], (int)s[3])) { kanji = 1; @@ -2253,7 +2253,7 @@ } *p++ = *s++; } - *p = *s; /* terminate string */ + *p = '\0'; /* terminate string */ strcpy(t, buf); return 0; --- lynx-2.8.5.orig/src/LYReadCFG.c +++ lynx-2.8.5/src/LYReadCFG.c @@ -450,6 +450,16 @@ } Config_Type; +PRIVATE int set_personal_extension_map ARGS1( + char *, value) +{ + StrAllocCopy(personal_extension_map, Home_Dir()); + StrAllocCat(personal_extension_map, "/"); + StrAllocCat(personal_extension_map, value); + return 0; +} + + PRIVATE int assume_charset_fun ARGS1( char *, value) { @@ -1431,7 +1441,7 @@ #ifdef USE_PERSISTENT_COOKIES PARSE_SET(RC_PERSISTENT_COOKIES, persistent_cookies), #endif /* USE_PERSISTENT_COOKIES */ - PARSE_STR(RC_PERSONAL_EXTENSION_MAP, personal_extension_map), + PARSE_FUN(RC_PERSONAL_EXTENSION_MAP, set_personal_extension_map), PARSE_STR(RC_PERSONAL_MAILCAP, personal_type_map), PARSE_STR(RC_PREFERRED_CHARSET, pref_charset), PARSE_STR(RC_PREFERRED_LANGUAGE, language), --- lynx-2.8.5.orig/src/LYMain.c +++ lynx-2.8.5/src/LYMain.c @@ -1123,9 +1123,17 @@ LYEscapeStartfile(&startfile); StrAllocCopy(indexfile, DEFAULT_INDEX_FILE); StrAllocCopy(global_type_map, GLOBAL_MAILCAP); - StrAllocCopy(personal_type_map, PERSONAL_MAILCAP); + + StrAllocCopy(personal_type_map, Home_Dir()); + StrAllocCat(personal_type_map, "/"); + StrAllocCat(personal_type_map, PERSONAL_MAILCAP); + StrAllocCopy(global_extension_map, GLOBAL_EXTENSION_MAP); - StrAllocCopy(personal_extension_map, PERSONAL_EXTENSION_MAP); + + StrAllocCopy(personal_extension_map, Home_Dir()); + StrAllocCat(personal_extension_map, "/"); + StrAllocCat(personal_extension_map, PERSONAL_EXTENSION_MAP); + StrAllocCopy(language, PREFERRED_LANGUAGE); StrAllocCopy(pref_charset, PREFERRED_CHARSET); StrAllocCopy(system_mail, SYSTEM_MAIL); --- lynx-2.8.5.orig/debian/menu +++ lynx-2.8.5/debian/menu @@ -0,0 +1,13 @@ +?package(lynx):\ + needs=text\ + section=Apps/Net\ + title="Lynx"\ + hints="Web Browsers" \ + kderemove=1 \ + command="/usr/bin/lynx" +?package(lynx):\ + needs=dwww\ + section=Apps/Net\ + title="Lynx Manual"\ + hints="Web Browser Manual" \ + command="/usr/share/doc/lynx/lynx_help/lynx_help_main.html" --- lynx-2.8.5.orig/debian/mime +++ lynx-2.8.5/debian/mime @@ -0,0 +1,2 @@ +text/html; /usr/bin/lynx -force_html %s; needsterminal; description=HTML Text; nametemplate=%s.html; priority=3 +text/html; /usr/bin/lynx -dump -force_html %s; copiousoutput; description=HTML Text; nametemplate=%s.html; priority=2 --- lynx-2.8.5.orig/debian/control +++ lynx-2.8.5/debian/control @@ -0,0 +1,23 @@ +Source: lynx +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: James Troup +Standards-Version: 3.6.0 +Section: web +Priority: optional +Build-Depends: libncursesw5-dev, zlib1g-dev, libbz2-dev, libgnutls-dev, gettext, dpatch + +Package: lynx +Architecture: any +Depends: ${shlibs:Depends} +Recommends: mime-support +Conflicts: lynx-ssl +Replaces: lynx-ssl +Provides: www-browser, news-reader, lynx-ssl +Description: Text-mode WWW Browser + Lynx is a fully-featured World Wide Web (WWW) client for users + running cursor-addressable, character-cell display devices (e.g., + vt100 terminals, vt100 emulators running on PCs or Macs, or any other + "curses-oriented" display). It will display hypertext markup language + (HTML) documents containing links to files residing on the local + system, as well as files residing on remote systems running Gopher, + HTTP, FTP, WAIS, and NNTP servers. --- lynx-2.8.5.orig/debian/desktop +++ lynx-2.8.5/debian/desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Application +Exec=/usr/bin/lynx %u +Name=Lynx +Terminal=1 +Comment=Lynx +Icon=html +MimeType=text/html +XClassHintResName=Lynx --- lynx-2.8.5.orig/debian/prerm +++ lynx-2.8.5/debian/prerm @@ -0,0 +1,9 @@ +#!/bin/sh + +case "$1" in + remove|deconfigure) + update-alternatives --quiet --remove www-browser /usr/bin/lynx + update-alternatives --quiet --remove lynx /usr/bin/lynx.stable + ;; + *) +esac --- lynx-2.8.5.orig/debian/rules +++ lynx-2.8.5/debian/rules @@ -0,0 +1,117 @@ +#! /usr/bin/make -f +# debian/rules file - for lynx (2.8.5) +# Based on sample debian/rules file - for GNU Hello (1.3). +# Copyright 1994, 1995 by Ian Jackson. +# Copyright 2002, 2003, 2004 James Troup +# I hereby give you perpetual unlimited permission to copy, +# modify and relicense this file, provided that you do not remove +# my name from the file itself. (I assert my moral right of +# paternity under the Copyright, Designs and Patents Act 1988.) +# This file may have to be extensively modified + +install_dir=install -d -m 755 +install_file=install -m 644 +install_script=install -m 755 +install_binary=install -m 755 -s + +include /usr/share/dpatch/dpatch.make + +build: patch-stamp + $(checkdir) + ./configure --prefix=/usr \ + --libexecdir=/usr/lib --sysconfdir=/etc \ + --localstatedir=/var --libdir=/etc \ + --enable-warnings \ + --with-screen=ncursesw --enable-8bit-toupper \ + --enable-externs \ + --enable-cgi-links --enable-exec-links \ + --enable-exec-scripts \ + --enable-persistent-cookies --enable-nls \ + --enable-prettysrc --enable-source-cache \ + --enable-charset-choice \ + --enable-default-colors \ + --enable-ipv6 \ + --enable-nested-tables --enable-read-eta \ + --with-gnutls=/usr \ + --with-zlib \ + --with-bzlib + $(MAKE) + touch build + +clean: unpatch + $(checkdir) + -rm -rf build debian/tmp debian/files debian/substvars debian/patched + -(find . -type f -name \*~ | xargs rm) + -$(MAKE) distclean + -rm -f config.cache config.log lynx + +binary-indep: + +binary-arch: checkroot build + $(checkdir) + -rm -rf debian/tmp/ + $(install_dir) debian/tmp/DEBIAN/ + $(install_script) debian/preinst debian/postinst debian/prerm debian/postrm debian/tmp/DEBIAN/ + $(install_file) debian/conffiles debian/tmp/DEBIAN/ + + $(install_dir) debian/tmp/usr/bin/ + $(install_binary) lynx debian/tmp/usr/bin/lynx.stable + + $(install_dir) debian/tmp/etc/ + $(install_file) lynx.cfg debian/tmp/etc/ + + $(install_dir) debian/tmp/usr/share/man/man1/ + $(install_file) lynx.man debian/tmp/usr/share/man/man1/lynx.1 + find debian/tmp/usr/share/man/ -type f -print | xargs gzip -9 + + $(install_dir) debian/tmp/usr/share/locale/ + for f in po/*.gmo; do \ + cat=`basename $$f`; \ + lang=`echo $$cat | sed 's/\.gmo$$//'`; \ + $(install_dir) debian/tmp/usr/share/locale/$$lang/LC_MESSAGES; \ + $(install_file) $$f debian/tmp/usr/share/locale/$$lang/LC_MESSAGES/lynx.mo; \ + done + + $(install_dir) debian/tmp/usr/share/doc/lynx/ + cp -R lynx_help debian/tmp/usr/share/doc/lynx/ + cat CHANGES `ls docs/CHANGES* |sort -t . -rn -k 2,2 -k 3,3` \ + > debian/tmp/usr/share/doc/lynx/changelog + $(install_file) docs/CRAWL.announce docs/FM.announce \ + docs/README.chartrans PROBLEMS README \ + samples/jumpsUnix.html samples/cernrules.txt \ + samples/lynx-keymaps debian/tmp/usr/share/doc/lynx/ + $(install_dir) debian/tmp/usr/share/doc/lynx/test/ + $(install_file) test/* debian/tmp/usr/share/doc/lynx/test/ + $(install_file) debian/changelog debian/tmp/usr/share/doc/lynx/changelog.Debian + $(install_file) debian/README.Debian debian/tmp/usr/share/doc/lynx/README.Debian + find debian/tmp/usr/share/doc/lynx -type f -maxdepth 1 | xargs gzip -9v + $(install_file) debian/copyright debian/tmp/usr/share/doc/lynx/ + + $(install_dir) debian/tmp/usr/lib/menu/ + $(install_file) debian/menu debian/tmp/usr/lib/menu/lynx + + $(install_dir) debian/tmp/usr/share/applnk/Internet + $(install_file) debian/desktop debian/tmp/usr/share/applnk/Internet/lynx.desktop + + $(install_dir) debian/tmp/usr/lib/mime/packages/ + $(install_file) debian/mime debian/tmp/usr/lib/mime/packages/lynx + + dpkg-shlibdeps debian/tmp/usr/bin/lynx.stable + dpkg-gencontrol -isp + chown -R root.root debian/tmp/ + chmod -R go=rX debian/tmp/ + dpkg --build debian/tmp/ .. + +define checkdir + test -f src/LYMain.c -a -f debian/rules +endef + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +checkroot: + $(checkdir) + test root = "`whoami`" + +.PHONY: binary binary-arch binary-indep clean checkroot patch unpatch --- lynx-2.8.5.orig/debian/conffiles +++ lynx-2.8.5/debian/conffiles @@ -0,0 +1 @@ +/etc/lynx.cfg --- lynx-2.8.5.orig/debian/changelog +++ lynx-2.8.5/debian/changelog @@ -0,0 +1,597 @@ +lynx (2.8.5-2ubuntu4) feisty; urgency=low + + * Rebuild for changes in the amd64 toolchain. + * Set Ubuntu maintainer address. + + -- Matthias Klose Mon, 5 Mar 2007 01:22:29 +0000 + +lynx (2.8.5-2ubuntu3) feisty; urgency=low + + * Fake sync with a higher version number than current feisty, package can be + synced once Debian gets a new upload with a real revision number. + + -- Martin Pitt Wed, 6 Dec 2006 12:42:17 +0100 + +lynx (2.8.5-2sarge2.2) unstable; urgency=low + + * Non-maintainer upload. + * Read user configuration from home directory, not current + working directory. Closes: #396964 + Thanks to Tom Parker for the patch. + + -- Andreas Barth Mon, 27 Nov 2006 07:43:17 +0100 + +lynx (2.8.5-2sarge2.1) unstable; urgency=low + + * NMU. + * Fixed changelog entry that closes #384725. + * Used a debian version greater than the one in stable-security. + + -- Anibal Monsalve Salazar Thu, 14 Sep 2006 09:15:56 +1000 + +lynx (2.8.5-2sarge1.2) unstable; urgency=high + + * NMU. + * Fixed CVE-2004-1617 (see DSA-1076-1). + [debian/patches/04_CVE-2004-1617.dpatch] + Patch by Thomas E. Dickey . + Closes: #384725. + * Fixed "FTBFS on GNU/Hurd (and GNU/k*BSD)". + [debian/patches/05_FTBFS_on_GNUHurd_and_GNUkBSD] + Patch by Robert Millan . + Closes: #238057. + + -- Anibal Monsalve Salazar Wed, 13 Sep 2006 18:41:49 +1000 + +lynx (2.8.5-2sarge1.1) unstable; urgency=low + + * Non-maintainer upload. + * Now build-depending on libgnutls-dev so libgnutls11 can be + removed (Closes: #335765). + + -- David Moreno Garza Sun, 13 Aug 2006 18:09:34 -0500 + + +lynx (2.8.5-2sarge1) stable-security; urgency=high + + * Non-maintainer upload by the Security Team + * Applied patch by Ulf H?rnhammar to fix buffer overflow that can lead + to arbitrary code execution [WWW/Library/Implementation/HTMIME.c, + CAN-2005-3120] + + -- Martin Schulze Sat, 8 Oct 2005 09:23:11 +0200 + +lynx (2.8.5-2) unstable; urgency=low + + * 03_newer_gnutls.dpatch: new patch from Torbj?rn Wassberg to add + '-lgnutls-openssl' to LIBS to allow compilation with gnutls11. + * debian/control (Build-Depends): s/gnutls7/gnutls11/. Closes: #264754 + + -- James Troup Sun, 26 Sep 2004 13:36:41 +0100 + +lynx (2.8.5-1) unstable; urgency=low + + * New upstream release. Closes: #210948 + * Should now build on the Hurd. Closes: #140682 + * -auth=id:pw no longer ignored when using -source or -dump. Closes: #156498 + * Default cookie Path is not correct. Closes: #181614 + * Can now switch to bookmarks under 'z'. Closes: #111463 + * Fixes only highlighting the first two lines of a hyperlink. Closes: #114062, #124361 + * Fixed missing space in german localisation. Closes: #116495 + * Fixed problems with wiki-login. Closes: #124025 + * No longer ignores Refresh: in HTTP headers. Closes: #126723 + * Forms now sent using proper encoding. Closes: #156680 + * Fixes confusion of whereis query inside of long