~ubuntu-branches/debian/sid/nfs-utils/sid

« back to all changes in this revision

Viewing changes to support/export/client.c

  • Committer: Package Import Robot
  • Author(s): Steve Langasek
  • Date: 2014-08-12 17:12:38 UTC
  • Revision ID: package-import@ubuntu.com-20140812171238-foqromrq96ai1sge
Tags: 1:1.2.8-9
debian/patches/22-mountd-fix-segfault-in-add_name-with-newer-gcc-
compi.patch: cherry-pick fix from upstream for a segfault in 
add_name with newer gcc compilers.  Closes: #757835, LP: #1355829.

Show diffs side-by-side

added added

removed removed

Lines of Context:
482
482
                else
483
483
                        cp = cp + strlen(cp);
484
484
        }
485
 
        strncpy(new, old, cp-old);
486
 
        new[cp-old] = 0;
 
485
        if (old) {
 
486
                strncpy(new, old, cp-old);
 
487
                new[cp-old] = 0;
 
488
        } else {
 
489
                new[0] = 0;
 
490
        }
487
491
        if (cp != old && !*cp)
488
492
                strcat(new, ",");
489
493
        strcat(new, add);