~ubuntu-branches/ubuntu/trusty/dosfstools/trusty

« back to all changes in this revision

Viewing changes to src/dosfslabel.c

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-05-24 09:48:16 UTC
  • Revision ID: package-import@ubuntu.com-20130524094816-4tyntljuuvch1p81
Tags: 3.0.16-2ubuntu2
Add dosfslabel_bounds_check.patch: dosfslabel: When checking whether the
label contains any lower-case characters, do not read beyond the end of
the string. (Closes: #709587)

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
                    "dosfslabel: labels can be no longer than 11 characters\n");
116
116
            exit(1);
117
117
        }
118
 
        for (i = 0; i < 11; i++)
 
118
        for (i = 0; label[i] && i < 11; i++)
119
119
          /* don't know if here should be more strict !uppercase(label[i])*/
120
120
          if (islower(label[i])) {
121
121
            fprintf(stderr,