~ilya-yanok/ubuntu/precise/grub2/fix-for-948716

« back to all changes in this revision

Viewing changes to fs/minix.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Millan
  • Date: 2009-07-25 19:00:53 UTC
  • mfrom: (1.6.3 upstream)
  • mto: (17.4.13 sid)
  • mto: This revision was merged to the branch mainline in revision 53.
  • Revision ID: james.westby@ubuntu.com-20090725190053-uv3lm6ya3zxs77ep
ImportĀ upstreamĀ versionĀ 1.96+20090725

Show diffs side-by-side

added added

removed removed

Lines of Context:
193
193
  int blockcnt;
194
194
 
195
195
  /* Adjust len so it we can't read past the end of the file.  */
196
 
  if (len + pos > GRUB_MINIX_INODE_SIZE (data))
197
 
    len = GRUB_MINIX_INODE_SIZE (data) - pos;
 
196
  if (len > GRUB_MINIX_INODE_SIZE (data))
 
197
    len = GRUB_MINIX_INODE_SIZE (data);
198
198
 
199
199
  blockcnt = (len + pos + GRUB_MINIX_BSIZE - 1) / GRUB_MINIX_BSIZE;
200
200