Hi,
I maintain blender in openSUSE and I got this message from our build service building blender-2.77 for the first time:
I: Statement might be overflowing a buffer in strncat. Common mistake:
BAD: strncat(buffer,charptr,sizeof(buffer)) is wrong, it takes the left over size as 3rd argument
GOOD: strncat(buffer,charptr,sizeof(buffer)-strlen(buffer)-1)
E: blender bufferoverflowstrncat /home/abuild/rpmbuild/BUILD/blender-2.77/source/blender/editors/space_file/file_ops.c:1378:4

I've attached a patch.
Best regards
Dave Plater
Index: source/blender/editors/space_file/file_ops.c
===================================================================
--- source/blender/editors/space_file/file_ops.c.orig
+++ source/blender/editors/space_file/file_ops.c
@@ -1375,7 +1375,7 @@ int file_exec(bContext *C, wmOperator *e
 		}
 		else {
 			BLI_cleanup_dir(G.main->name, sfile->params->dir);
-			strncat(sfile->params->dir, file->relpath, sizeof(sfile->params->dir));
+			strncat(sfile->params->dir, file->relpath, sizeof(sfile->params->dir)-strlen(sfile->params->dir)-1);
 			BLI_add_slash(sfile->params->dir);
 		}
 
_______________________________________________
Bf-committers mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-committers

Reply via email to