Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-12-28 18:08:36 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-12-28 18:09:06 +0300
commit6f1c44e61180a5551a874ad382ff52ad664ada1c (patch)
tree358704be66b55ea16aa0f8cd273e01e2b0f4a883 /source/blender/blenlib/intern/fileops.c
parent1a246afe0330546a9fb526558d24b47c69e678d4 (diff)
Some fixes from coverity (only one really nasty, in paint_proj).
Diffstat (limited to 'source/blender/blenlib/intern/fileops.c')
-rw-r--r--source/blender/blenlib/intern/fileops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index 5dc10143099..401bdd445e5 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -825,7 +825,7 @@ static int copy_single_file(const char *from, const char *to)
ssize_t link_len;
/* get large enough buffer to read link content */
- if (st.st_size < sizeof(buf)) {
+ if ((st.st_size + 1) < sizeof(buf)) {
link_buffer = buf;
need_free = 0;
}
@@ -843,7 +843,7 @@ static int copy_single_file(const char *from, const char *to)
return RecursiveOp_Callback_Error;
}
- link_buffer[link_len] = 0;
+ link_buffer[link_len] = '\0';
if (symlink(link_buffer, to)) {
perror("symlink");