You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by ab...@apache.org on 2015/02/16 13:19:19 UTC

svn commit: r1660088 - /celix/trunk/framework/private/src/framework.c

Author: abroekhuis
Date: Mon Feb 16 12:19:18 2015
New Revision: 1660088

URL: http://svn.apache.org/r1660088
Log:
CELIX-219: Set library path to 0 to prevent buffer overflows.

Modified:
    celix/trunk/framework/private/src/framework.c

Modified: celix/trunk/framework/private/src/framework.c
URL: http://svn.apache.org/viewvc/celix/trunk/framework/private/src/framework.c?rev=1660088&r1=1660087&r2=1660088&view=diff
==============================================================================
--- celix/trunk/framework/private/src/framework.c (original)
+++ celix/trunk/framework/private/src/framework.c Mon Feb 16 12:19:18 2015
@@ -2414,6 +2414,7 @@ static celix_status_t framework_loadLibr
     status = CELIX_DO_IF(status, bundleArchive_getArchiveRoot(archive, &archiveRoot));
     status = CELIX_DO_IF(status, bundleArchive_getCurrentRevisionNumber(archive, &revisionNumber));
 
+    memset(libraryPath, 0, sizeof(libraryPath));
     int written = snprintf(libraryPath, 256, "%s/version%ld.%ld/%s%s%s", archiveRoot, refreshCount, revisionNumber, library_prefix, library, library_extension);
 
     if (written >= 256) {