Date: Fri, 15 Sep 1995 12:37:58 +0100 From: Chris Stenton <jacs@gnome.co.uk> To: freebsd-bugs@freebsd.org Subject: lpr bug in FreeBSD-stable + Fix Message-ID: <jacs-9508151137.AA00012271@hawk.gnome.co.uk>
next in thread | raw e-mail | index | archive | help
Picked up a copy of FreeBSD-stable yesterday; there is a bug in that lpr -r does not work here is the patch to make it work *** lpr.c.orig Fri Sep 15 11:29:16 1995 --- lpr.c Fri Sep 15 12:20:08 1995 *************** *** 600,609 **** if (cp == file) { fd = checkwriteperm(file,"/"); } else { ! strcpy(path,file); *cp = '\0'; fd = checkwriteperm(path,file); *cp = '/'; } if (fd == 0) return(1); --- 600,611 ---- if (cp == file) { fd = checkwriteperm(file,"/"); } else { ! path = malloc(strlen(file)+1 ); ! strcpy (path, file); *cp = '\0'; fd = checkwriteperm(path,file); *cp = '/'; + free(path); } if (fd == 0) return(1); ------------------------------------------------------------------------------- Dr Chris Stenton chris@gnome.co.uk Gnome Computers Ltd Tel/Fax: 44 (0)1480 406164 25A Huntingdon St, St Neots, Cambridgeshire, PE19 1BG ------------------------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?jacs-9508151137.AA00012271>