Commit d9555a3c authored by Gianfranco Costamagna's avatar Gianfranco Costamagna

Update previous patch with one NPE safe (from Fedora)

parent 37a991fe
ncrack (0.5-5) unstable; urgency=medium
* Team upload.
* Update the previous patch, with the Fedora one
-- Gianfranco Costamagna <locutusofborg@debian.org> Fri, 25 Aug 2017 16:20:34 +0200
ncrack (0.5-4) unstable; urgency=medium
* Team upload.
......
Description: Fix build with GCC 7
Description: Fix build with GCC 7.
Note, the original approach was not NPE safe, while the Fedora patch seems to take care
of the pointer being NULL
Author: Raphaël Hertzog <hertzog@debian.org>
Bug: https://github.com/nmap/ncrack
Bug-Debian: https://bugs.debian.org/853570
--- a/ncrack_resume.cc
+++ b/ncrack_resume.cc
@@ -520,7 +520,7 @@ ncrack_resume(char *fname, int *myargc,
diff -ru ncrack-0.5/ncrack_resume.cc ncrack-0.5.new/ncrack_resume.cc
--- ncrack-0.5/ncrack_resume.cc 2016-04-10 18:56:02.000000000 +0200
+++ ncrack-0.5.new/ncrack_resume.cc 2017-04-13 17:53:09.369522756 +0200
@@ -520,7 +520,7 @@
j = 0;
buf[j++] = *q;
- while (q != '\0' && j < sizeof(buf)) {
+ while (*q != '\0' && j < sizeof(buf)) {
+ while ((q != NULL) && (j < sizeof(buf))) {
q++;
if (q - filestr >= filelen)
fatal("Corrupted file! Error 5\n");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment