diff options
author | Andrea Weikert <elubie@gmx.net> | 2010-02-28 14:02:06 +0300 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2010-02-28 14:02:06 +0300 |
commit | 1a2ceea38155091bdd9bf8cb6f25cfeef54c3c89 (patch) | |
tree | 60d71e30243a221599c0068d4c534664bcd7bb89 /source | |
parent | 9789e08942d7b1021c959fc5ea8db6317f853ed5 (diff) |
soundfile loading: fix crash with long path to the sound file (was 160 only and unchecked)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_sound_types.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 93b1ef379d8..e014b209e07 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -132,7 +132,7 @@ struct bSound* sound_new_file(struct Main *bmain, char* filename) len--; sound = alloc_libblock(&bmain->sound, ID_SO, filename+len); - strcpy(sound->name, filename); + BLI_strncpy(sound->name, filename, FILE_MAX); // XXX unused currently sound->type = SOUND_TYPE_FILE; sound_load(bmain, sound); diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h index 60e2ad307e5..45dff0c96fa 100644 --- a/source/blender/makesdna/DNA_sound_types.h +++ b/source/blender/makesdna/DNA_sound_types.h @@ -59,7 +59,7 @@ typedef struct bSound { /** * The path to the sound file. */ - char name[160]; + char name[240]; /** * The packed file. |