From: Otto Moerbeek Date: Fri, 11 Dec 2020 10:11:00 +0000 (+0100) Subject: Make the processing binary safe and zap the incbin include from ws-auth.cc X-Git-Tag: rec-4.5.0-alpha1~72^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9c1f9f42a6f4a391e13446697fc9f68d53c9a3be;p=thirdparty%2Fpdns.git Make the processing binary safe and zap the incbin include from ws-auth.cc --- diff --git a/pdns/incfiles b/pdns/incfiles index 0cda32e6ac..7d55d92301 100755 --- a/pdns/incfiles +++ b/pdns/incfiles @@ -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 diff --git a/pdns/ws-auth.cc b/pdns/ws-auth.cc index df0124f09b..64f923533f 100644 --- a/pdns/ws-auth.cc +++ b/pdns/ws-auth.cc @@ -47,7 +47,6 @@ #include "auth-caches.hh" #include "threadname.hh" #include "tsigutils.hh" -#include "ext/incbin/incbin.h" using json11::Json;