Ignore:
Timestamp:
Apr 22, 2016, 8:08:27 PM (8 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, 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_wavwrite.c

    r2d0e3fc rd2be104  
    9191
    9292  if (s->path) AUBIO_FREE(s->path);
    93   s->path = AUBIO_ARRAY(char_t, strnlen(path, PATH_MAX));
    94   strncpy(s->path, path, strnlen(path, PATH_MAX));
     93  s->path = AUBIO_ARRAY(char_t, strnlen(path, PATH_MAX) + 1);
     94  strncpy(s->path, path, strnlen(path, PATH_MAX) + 1);
    9595
    9696  s->max_size = MAX_SIZE;
Note: See TracChangeset for help on using the changeset viewer.