This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "sfcb - Small Footprint CIM Broker".
The branch, master has been updated
via c670aaa7544155b6acedb95d60d3421147ab34f8 (commit)
from e984e37fed5a7930344af3401676a3e1d80bdb1d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c670aaa7544155b6acedb95d60d3421147ab34f8
Author: Dave Heller <hel...@us...>
Date: Thu Feb 27 10:07:00 2014 -0500
[sfcb-tix:#103] Unsafe usage of strncpy in providerRegister.c
-----------------------------------------------------------------------
Summary of changes:
contributions.txt | 4 ++++
providerRegister.c | 3 ++-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/contributions.txt b/contributions.txt
index f72a5ac..f8d2f81 100644
--- a/contributions.txt
+++ b/contributions.txt
@@ -248,3 +248,7 @@ Ting Wang
Vitezslav Crhonek, Red Hat
----------
02/07/2014 [sfcb-tix:#98] sfcbmofpp segfaults if mof file ends with block comment without newline
+
+dcb314
+----------
+02/27/2014 [sfcb-tix:#103] Unsafe usage of strncpy in providerRegister.c
diff --git a/providerRegister.c b/providerRegister.c
index 78d0f7b..7632fdd 100644
--- a/providerRegister.c
+++ b/providerRegister.c
@@ -34,6 +34,7 @@
static ProviderInfo forceNotFound = { "", FORCE_PROVIDER_NOTFOUND };
extern unsigned long exFlags;
extern char *configfile;
+extern char *strncpy_kind(char *to, char *from, size_t size);
extern int setupControl(char *fn);
extern int getControlChars(char *id, char **val);
extern int getControlBool(char *id, int *val);
@@ -191,7 +192,7 @@ newProviderRegister()
dir = "/var/lib/sfcb/registration";
}
- strncpy(fin, dir, sizeof(fin)-18); /* 18 = strlen("/providerRegister")+1 */
+ strncpy_kind(fin, dir, sizeof(fin)-18); /* 18 = strlen("/providerRegister")+1 */
strcat(fin, "/providerRegister");
in = fopen(fin, "r");
if (in == NULL)
hooks/post-receive
--
sfcb - Small Footprint CIM Broker
|