Ignore:
Timestamp:
Apr 22, 2016, 8:08:27 PM (4 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
6f42c16
Parents:
2d0e3fc
Message:

src/io/: also copy null ending char

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/sink_sndfile.c

    r2d0e3fc rd2be104  
    6464
    6565  if (s->path) AUBIO_FREE(s->path);
    66   s->path = AUBIO_ARRAY(char_t, strnlen(path, PATH_MAX));
    67   strncpy(s->path, path, strnlen(path, PATH_MAX));
     66  s->path = AUBIO_ARRAY(char_t, strnlen(path, PATH_MAX) + 1);
     67  strncpy(s->path, path, strnlen(path, PATH_MAX) + 1);
    6868
    6969  s->samplerate = 0;
Note: See TracChangeset for help on using the changeset viewer.