]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Make the processing binary safe and zap the incbin include from ws-auth.cc
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 11 Dec 2020 10:11:00 +0000 (11:11 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 11 Dec 2020 10:11:00 +0000 (11:11 +0100)
pdns/incfiles
pdns/ws-auth.cc

index 0cda32e6ac4e71633f4d76e84cef146f5828ba18..7d55d92301e95a15c1604ca27ecb993a2f2c84f9 100755 (executable)
@@ -7,7 +7,7 @@ for a in $@
 do
        c=$(echo $a | tr "/.-" "___")
        echo "static const unsigned char ${c}Data[] = {"
-       od -v -t x "$a" | sed  's/^[0-9]*//' | sed 's/\([0-9a-f][0-9a-f]\)/0x\1,/g'
-       echo "0x0 };"
-       echo "static const string g_$c{(const char*)${c}Data};"
+       od -v -t x "$a" | sed  's/^[0-7]*//' | sed 's/\([0-9a-f][0-9a-f]\)/0x\1,/g'
+       echo "};"
+       echo "static const string g_$c{(const char*)${c}Data, sizeof(${c}Data)};"
 done
index df0124f09b472d97a6f55e06fe7d2b3af9c6765b..64f923533f2a9d84de4f92bf3ab3f47296c39b8f 100644 (file)
@@ -47,7 +47,6 @@
 #include "auth-caches.hh"
 #include "threadname.hh"
 #include "tsigutils.hh"
-#include "ext/incbin/incbin.h"
 
 using json11::Json;