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/system/dlt-system-filetransfer.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/system/dlt-system-filetransfer.c')
-rw-r--r-- | src/system/dlt-system-filetransfer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/system/dlt-system-filetransfer.c b/src/system/dlt-system-filetransfer.c index 72fe630..5cfcf09 100644 --- a/src/system/dlt-system-filetransfer.c +++ b/src/system/dlt-system-filetransfer.c @@ -368,7 +368,7 @@ int flush_dir_send(FiletransferOptions const *opts, const char *compress_dir, c //old file name (not: path) would have been: char tmp[strlen(dp->d_name)-strlen(COMPRESS_EXTENSION)+1]; strncpy(tmp,dp->d_name,strlen(dp->d_name)-strlen(COMPRESS_EXTENSION)); - tmp[strlen(dp->d_name)-3]='\0'; + tmp[strlen(dp->d_name)-strlen(COMPRESS_EXTENSION)]='\0'; int len = strlen(tmp)+strlen(compress_dir)+1+1;//2 sizes + 1*"/" + \0 char *path_uncompressed = malloc(len); |