~ubuntu-branches/ubuntu/vivid/silversearcher-ag/vivid

« back to all changes in this revision

Viewing changes to src/scandir.c

  • Committer: Package Import Robot
  • Author(s): Hajime Mizuno
  • Date: 2013-05-12 16:21:12 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130512162112-osdw6ht1jon6l534
Tags: 0.15~pre+20130512-1
* new upstream release
* debian/control
  - add "Build-Depends: liblzma-dev" to search for .xz compressed files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
         * Solaris, we need to actually allocate enough space for the whole
43
43
         * string.
44
44
         */
45
 
        d = malloc(sizeof(struct dirent) + strlen(entry->d_name));
 
45
        d = malloc(sizeof(struct dirent) + strlen(entry->d_name) + 1);
46
46
#else
47
47
        d = malloc(sizeof(struct dirent));
48
48
#endif