[fossology/fossology] 359ae6: fix(lib/c): Prevent possible buffer overflow/-run


Gaurav Mishra <noreply@...>
 

Branch: refs/heads/master
Home: https://github.com/fossology/fossology
Commit: 359ae6101bce1a37d155ae3f5d014cd86bdd6ecc
https://github.com/fossology/fossology/commit/359ae6101bce1a37d155ae3f5d014cd86bdd6ecc
Author: Andreas J. Reichel <andreas.reichel@...>
Date: 2019-08-14 (Wed, 14 Aug 2019)

Changed paths:
M src/lib/c/libfossdb.c
M src/lib/c/libfossrepo.c

Log Message:
-----------
fix(lib/c): Prevent possible buffer overflow/-run

Make sure the dest buffer of snprintf has enough space and use
strncpy correctly to make sure the dest buffer has a terminating 0.

Signed-off-by: Andreas J. Reichel <andreas.reichel@...>


Commit: 9d0765c2eda0b72c4a5aaac640322d4f59ffd7f4
https://github.com/fossology/fossology/commit/9d0765c2eda0b72c4a5aaac640322d4f59ffd7f4
Author: Gaurav Mishra <@gmishx>
Date: 2019-09-27 (Fri, 27 Sep 2019)

Changed paths:
M src/lib/c/libfossdb.c
M src/lib/c/libfossrepo.c

Log Message:
-----------
Merge pull request #1438 from andi8086/andreas/gcc8-lib

fix(lib/c): Prevent possible buffer overflow/-run

Reviewed-by: maximilian.huber@...
Tested-by: @gmishx


Compare: https://github.com/fossology/fossology/compare/e56f51b6f5b8...9d0765c2eda0

Join fossology-commits@lists.fossology.org to automatically receive all group messages.