diff options
author | Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> | 2014-03-26 16:42:26 +0100 |
---|---|---|
committer | Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> | 2014-04-01 10:21:04 +0200 |
commit | 2d3dc13f481bd6a5dfc16511f7df89903b69c4fd (patch) | |
tree | 6f0ffd297c7fc6c7b517784753455e2860bde8ec /src/tests/dlt-test-stress.c | |
parent | 8594f384fe8d622c20e7cb6091a2e99313e9830e (diff) | |
download | DLT-daemon-2d3dc13f481bd6a5dfc16511f7df89903b69c4fd.tar.gz |
Fixed: all possible malloc, sprintf and strcpy problems
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
Diffstat (limited to 'src/tests/dlt-test-stress.c')
-rwxr-xr-x | src/tests/dlt-test-stress.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tests/dlt-test-stress.c b/src/tests/dlt-test-stress.c index 2f50e7e..650aecd 100755 --- a/src/tests/dlt-test-stress.c +++ b/src/tests/dlt-test-stress.c @@ -102,7 +102,7 @@ void usage() { char version[255]; - dlt_get_version(version); + dlt_get_version(version,255); printf("Usage: dlt-test-stress [options]\n"); printf("Test application executing several stress tests.\n"); @@ -248,7 +248,7 @@ void stress1(void) { /* Generate id */ memset(ctid,0,5); - sprintf(ctid,"%d",i); + snprintf(ctid,5,"%d",i); //printf("%i: '%s' \n",i,ctid); @@ -322,7 +322,7 @@ void thread_function(void) memset(ctid,0,5); /* Create random context id */ - sprintf(ctid,"%.2x", rand() & 0x0000ffff); + snprintf(ctid,5,"%.2x", rand() & 0x0000ffff); usleep(rand()/1000); |