| @@ -1,15 +1,15 @@ | | | @@ -1,15 +1,15 @@ |
1 | $NetBSD: patch-utils_rand__tags.cpp,v 1.1 2016/12/17 14:18:32 joerg Exp $ | | 1 | $NetBSD: patch-utils_rand__tags.cpp,v 1.2 2017/09/01 07:52:02 wiz Exp $ |
2 | | | 2 | |
3 | Checking for negative pointers doesn't make sense. | | 3 | https://github.com/trendmicro/tlsh/commit/fb076b0f62b620e0de4cf95a5ccb81f21d4abc24#diff-02ad04ab1753a2119772311c29f24d23 |
4 | | | 4 | |
5 | --- utils/rand_tags.cpp.orig 2016-12-16 17:30:02.495417195 +0000 | | 5 | --- utils/rand_tags.cpp.orig 2016-12-16 17:30:02.495417195 +0000 |
6 | +++ utils/rand_tags.cpp | | 6 | +++ utils/rand_tags.cpp |
7 | @@ -366,7 +366,7 @@ struct tagdef oneoff_def[] = { | | 7 | @@ -366,7 +366,7 @@ struct tagdef oneoff_def[] = { |
8 | | | 8 | |
9 | static void rhtml_contents(std::string &htmls, int *ntags, int *ndistinct_tags) | | 9 | static void rhtml_contents(std::string &htmls, int *ntags, int *ndistinct_tags) |
10 | { | | 10 | { |
11 | - if ((*ntags <= 0) && (ndistinct_tags <= 0)) | | 11 | - if ((*ntags <= 0) && (ndistinct_tags <= 0)) |
12 | + if ((*ntags <= 0) && (ndistinct_tags == 0)) | | 12 | + if ((*ntags <= 0) && (*ndistinct_tags <= 0)) |
13 | return; | | 13 | return; |
14 | if (random() % 10 == 1) { | | 14 | if (random() % 10 == 1) { |
15 | anchor(htmls); | | 15 | anchor(htmls); |