From 82e80112082b0cc71bdab3d12ac6c503cc126e0d Mon Sep 17 00:00:00 2001
From: Caolán McNamara <caolanm@redhat.com>
Date: Sat, 22 Mar 2014 16:57:17 +0000
Subject: coverity#983370 Dereference before null check

Change-Id: I524ce73811f32b7da38ef127ee4633a2c6a9f933
---
 extensions/source/nsplugin/source/npshell.cxx | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

(limited to 'extensions')

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
-- 
cgit