X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=plocate-build.cpp;h=132a3ff83835fd7c579809becbfff043de6b9998;hb=7a7af4649b47543e32105dee4ef7045d279a4dd9;hp=62be45dab81e70a1fd94ca8fa29bc6163487a766;hpb=e1c30afeca4717fd2d123224f82901f305f92451;p=plocate diff --git a/plocate-build.cpp b/plocate-build.cpp index 62be45d..132a3ff 100644 --- a/plocate-build.cpp +++ b/plocate-build.cpp @@ -4,6 +4,7 @@ #include #include +#include #include #include #include @@ -420,6 +421,12 @@ void read_mlocate(FILE *fp, DatabaseReceiver *receiver) // TODO: Care about the base path. string path = read_cstr(fp); + + if (fseek(fp, ntohl(hdr.conf_size), SEEK_CUR) != 0) { + perror("skip conf block"); + exit(1); + } + while (!feof(fp)) { handle_directory(fp, receiver); }