diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-22 16:57:17 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-22 16:57:17 +0000 |
commit | 82e80112082b0cc71bdab3d12ac6c503cc126e0d (patch) | |
tree | 6a8513c9bbdacc20506bf0ceb26ce482b3eba184 /extensions | |
parent | 9e5f76941eb63fd3a6257895f0731315165ddb12 (diff) |
coverity#983370 Dereference before null check
Change-Id: I524ce73811f32b7da38ef127ee4633a2c6a9f933
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/nsplugin/source/npshell.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/extensions/source/nsplugin/source/npshell.cxx b/extensions/source/nsplugin/source/npshell.cxx index 48fc5396e9c0..ae0714b60c1f 100644 --- a/extensions/source/nsplugin/source/npshell.cxx +++ b/extensions/source/nsplugin/source/npshell.cxx @@ -427,9 +427,7 @@ NPMIMEType dupMimeType(NPMIMEType type) { NPMIMEType mimetype = (NPMIMEType) NPN_MemAlloc(strlen(type)+1); - mimetype[strlen(type)] = 0; - if (mimetype) - strcpy(mimetype, type); + strcpy(mimetype, type); return(mimetype); } #endif // end of UNIX |