I posted two bug-fixing patches to the tracker, https://trac.torproject.org/projects/tor/ticket/2206 https://trac.torproject.org/projects/tor/ticket/2207
but don't see them in git://git.wifi.pps.jussieu.fr/polipo or in git://git.torproject.org/git/polipo (now off-line?). Here they are again, in case you prefer to use the mailing list: >From 0e229555e167397010af11e625518401fa94dd6e Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyer...@redhat.com> Date: Sun, 21 Nov 2010 06:54:08 +0100 Subject: [PATCH 1/2] avoid NULL-dereference upon malloc failure * config.c (parseAtom): Correct typo: s/buf/s/ --- config.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/config.c b/config.c index 60d9ec5..a2d735e 100644 --- a/config.c +++ b/config.c @@ -571,7 +571,7 @@ parseAtom(char *buf, int offset, AtomPtr *value_return, int insensitive) if(escape) { s = malloc(i - y0); - if(buf == NULL) return -1; + if(s == NULL) return -1; k = 0; j = y0; while(j < i) { -- 1.7.3.5 >From 62edd1102e3d2efe2fb4eb70c8c606e5fc56110a Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyer...@redhat.com> Date: Sun, 21 Nov 2010 09:18:16 +0100 Subject: [PATCH 2/2] avoid another NULL-dereference upon malloc failure * local.c (fillSpecialObject): Log the allocation failure and exit, rather than falling through to dereference the NULL pointer. --- local.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/local.c b/local.c index 82106c4..6828a08 100644 --- a/local.c +++ b/local.c @@ -560,12 +560,12 @@ fillSpecialObject(ObjectPtr object, void (*fn)(FILE*, char*), void* closure) request = malloc(sizeof(SpecialRequestRec)); if(request == NULL) { + int saved_errno = errno; kill(pid, SIGTERM); close(filedes[0]); - abortObject(object, 503, - internAtom("Couldn't allocate request\n")); - notifyObject(object); - /* specialRequestHandler will take care of the rest. */ + do_log_error(L_ERROR, saved_errno, "Couldn't allocate request\n"); + polipoExit(); + return; } else { request->buf = get_chunk(); if(request->buf == NULL) { -- 1.7.3.5 ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Polipo-users mailing list Polipo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/polipo-users