diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2015-01-06 12:12:49 +0100 |
---|---|---|
committer | Mikael Magnusson <mikachu@gmail.com> | 2015-01-06 23:51:19 +0100 |
commit | 8fea30a5719946c9164352501caaa2d057e1dbc6 (patch) | |
tree | 856515579a20af1f9a9ff025c84ac4bf293e07c1 | |
parent | 4701b05cf760fddeee4b203f04130540f2d903a8 (diff) | |
download | zsh-8fea30a5719946c9164352501caaa2d057e1dbc6.tar.gz zsh-8fea30a5719946c9164352501caaa2d057e1dbc6.tar.xz zsh-8fea30a5719946c9164352501caaa2d057e1dbc6.zip |
34122: module: allow NULL third argument as intended
Found by Coverity.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Src/module.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index c3957f049..32bd15928 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-01-06 Barton E. Schaefer <schaefer@zsh.org> + + * 34122: Src/module.c: allow NULL third argument as intended + 2015-01-06 Mikael Magnusson <mikachu@gmail.com> * 34138: Src/utils.c: wcs_nicechar: only deref widthp if it diff --git a/Src/module.c b/Src/module.c index 9e8b3cc2a..bcc0ba833 100644 --- a/Src/module.c +++ b/Src/module.c @@ -3367,7 +3367,7 @@ mod_export int handlefeatures(Module m, Features f, int **enables) { if (!enables || *enables) - return setfeatureenables(m, f, *enables); + return setfeatureenables(m, f, enables ? *enables : NULL); *enables = getfeatureenables(m, f); return 0; } |