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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-13 17:56:40 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-13 17:56:40 +0400
commit46a673c2957dade00da91381a56ed9352fe9b923 (patch)
treeb7abe0151b4a7bf8a65b42160269a1ac16158c18 /source
parentd4d95ea1c1b53364e37827a7e65086d6e8cc2e20 (diff)
fix another buffer overrun error, also replace BLI_snprintf with BLI_strncpy since no formatting is needed in this case.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 40421c25607..ebbe57a6f81 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -207,7 +207,7 @@ typedef struct PaintAdjData {
static int setError(DynamicPaintCanvasSettings *canvas, const char *string)
{
/* Add error to canvas ui info label */
- BLI_snprintf(canvas->error, sizeof(canvas->error), string);
+ BLI_strncpy(canvas->error, string, sizeof(canvas->error));
return 0;
}
@@ -1919,7 +1919,7 @@ static int dynamicPaint_findNeighbourPixel(PaintUVPoint *tempPoints, DerivedMesh
/* Get closest edge to that subpixel on UV map */
{
float pixel[2], dist, t_dist;
- int i, uindex[2], edge1_index, edge2_index,
+ int i, uindex[3], edge1_index, edge2_index,
e1_index, e2_index, target_face;
float closest_point[2], lambda, dir_vec[2];
int target_uv1, target_uv2, final_pixel[2], final_index;