]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
delta: avoid potential zero division
authorViktor Szakats <commit@vsz.me>
Wed, 18 Mar 2026 09:54:27 +0000 (10:54 +0100)
committerViktor Szakats <commit@vsz.me>
Wed, 18 Mar 2026 10:37:15 +0000 (11:37 +0100)
Found by Codex Security

Closes #20977

scripts/delta

index f34525ca8dfa65c296362fd6aa174eba15b0c6af..2045f0f802247423e5fd4bb4fbb3e3fbfb916956 100755 (executable)
@@ -169,7 +169,7 @@ printf "New command line options:       %d (total %d)\n",
     $noptions, $aoptions;
 printf "Changes logged:                 %d\n", $numchanges;
 printf "Bugfixes logged:                %d (%.2f per day)\n",
-    $numbugfixes, $numbugfixes / $days;
+    $numbugfixes, $days ? $numbugfixes / $days : $numbugfixes;
 printf "Added files:                    %d (total %d)\n",
     $creates, $afiles;
 printf "Deleted files:                  %d (delta: %d)\n", $deletes,