Przeglądaj źródła

s-s-d: Fix number of entries computation returned by sysctl() on */kFreeBSD

Guillem Jover 10 lat temu
rodzic
commit
b1e7927080
2 zmienionych plików z 3 dodań i 1 usunięć
  1. 2 0
      debian/changelog
  2. 1 1
      utils/start-stop-daemon.c

+ 2 - 0
debian/changelog

@@ -13,6 +13,8 @@ dpkg (1.18.8) UNRELEASED; urgency=medium
     into .dsc files. Based on a patch by Martin Pitt <martin.pitt@ubuntu.com>.
     Closes: #779559
   * Add new dpkg-source --no-overwrite-dir extraction option. Closes: #826334
+  * Fix number of entries computation returned by sysctl() on */kFreeBSD in
+    start-stop-daemon.
   * Perl modules:
     - Use warnings::warnif() instead of carp() for deprecated warnings.
     - Add new format_range() method and deprecate dpkg() and rfc822() methods

+ 1 - 1
utils/start-stop-daemon.c

@@ -1936,7 +1936,7 @@ do_procinit(void)
 		return false;
 	if (len == 0)
 		return false;
-	nentries = len;
+	nentries = len / sizeof(*kp);
 
 	for (i = 0; i < nentries; i++) {
 		enum status_code pid_status;