Fixes output of "modinfo nf_conntrack_ipv4"
module: /lib/modules/4.4.40/nf_conntrack_ipv4.ko
license: GPL
alias: ip_conntrack
alias: nf_conntrack-2
depends: nf_conntrack,nf_defrag_ipv4
src: %pI4 dst=%pI4
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
}
strings = map + offset;
- while (strings && (strings < map + offset + size)) {
+ while (true) {
char *sep;
int len;
while (!strings[0])
strings++;
+ if (strings >= map + offset + size)
+ break;
sep = strstr(strings, "=");
if (!sep)
break;
strings = map + offset;
printf("module:\t\t%s\n", module);
- while (strings && (strings < map + offset + size)) {
+ while (true) {
char *dup = NULL;
char *sep;
while (!strings[0])
strings++;
+ if (strings >= map + offset + size)
+ break;
sep = strstr(strings, "=");
if (!sep)
break;