Avoid a NULL pointer dereference if strchr doesn't find any occurence
of '*' in the string. Whilst we handle the not found case when inserting
a mid string terminator, we don't handle it when restoring the string to
its previous value.
Change-Id: Ie0b3e18d89073a1694bba2749111c73f59150bdb
Reviewed-on: http://gerrit.openafs.org/9158
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
}
f_print(fout, "\t%s %s", plist->pl.param_type,
plist->pl.param_name);
- *pntr = pres;
+ if (pntr)
+ *pntr = pres;
} else if (strchr(plist->pl.param_type, '*') == 0) {
f_print(fout, "\t%s %s", plist->pl.param_type,
plist->pl.param_name);