Explorar el Código

Fix segfault with getenv("PATH") returns null.

Adam Heath hace 24 años
padre
commit
f6c60a2397
Se han modificado 3 ficheros con 7 adiciones y 1 borrados
  1. 5 0
      ChangeLog
  2. 1 0
      debian/changelog
  3. 1 1
      main/help.c

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+Fri Mar  1 23:27:16 CST 2002 Adam Heath <doogie@debian.org>
+
+  * main/help.c, debian/changelog: Fix segfault with getenv("PATH") returns
+    null.
+
 Fri Mar  1 23:22:55 CST 2002 Adam Heath <doogie@debian.org>
 
   * configure.in: Remove old doc/*/Makefile.  Bad Wichert.

+ 1 - 0
debian/changelog

@@ -84,6 +84,7 @@ dpkg (1.10) unstable; urgency=low
   * Improve wording of update-alternatives --config text. Closes: Bug#133035
   * Add manpages for dpkg.cfg and dselect.cfg. Closes: Bug#132901
   * Improve test for illegal packagename for dpkg-gencontrol -p option
+  * Fix segfault when getenv("PATH") returns null.  Closes: Bug#136349
 
  -- Wichert Akkerman <wakkerma@debian.org>  Mon, 20 Aug 2001 14:54:38 +0200
 

+ 1 - 1
main/help.c

@@ -84,7 +84,7 @@ void checkpath(void) {
   long l;
 
   path= getenv("PATH");
-  if (!path) fputs(_("dpkg - warning: PATH is not set.\n"), stderr);
+  if (!path) ohshit(_("dpkg - error: PATH is not set.\n"));
   buf=(char*)m_malloc(strlen(path)+2+strlen("start-stop-daemon"));
   
   for (clp=checklist; *clp; clp++) {