Explorar el Código

libdpkg: Do not dereference NULL pointers on dpkg_arch_remove()

Regression introduced in commit 1c1c2f7dc4b191f665f7cf7d8f70e7b66f942212.
Guillem Jover hace 14 años
padre
commit
4d0ff8d19f
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/dpkg/arch.c

+ 1 - 1
lib/dpkg/arch.c

@@ -249,7 +249,7 @@ dpkg_arch_remove(struct dpkg_arch *arch_remove)
 {
 	struct dpkg_arch *arch;
 
-	for (arch = arch_builtin_tail; arch->next; arch = arch->next) {
+	for (arch = arch_builtin_tail; arch && arch->next; arch = arch->next) {
 		if (arch->next->type != arch_foreign)
 			continue;