lkml.org 
[lkml]   [2012]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectpotential off by one in vdso reloc_symtab()
Hi Jeremy,

I'm doing an audit for off by one errors and I had a question about
the code in reloc_symtab().

arch/x86/vdso/vdso32-setup.c
86 for(i = 0; i < nsym; i++, sym++) {
87 if (sym->st_shndx == SHN_UNDEF ||
88 sym->st_shndx == SHN_ABS)
89 continue; /* skip */
90
91 if (sym->st_shndx > SHN_LORESERVE) {
^^^^^^^^^^^^^^^

Should this be >= SHN_LORESERVE? The other comparisons with
SHN_LORESERVE put == SHN_LORESERVE together with the >.

92 printk(KERN_INFO "VDSO: unexpected st_shndx %x\n",
93 sym->st_shndx);
94 continue;
95 }

regards,
dan carpenter



\
 
 \ /
  Last update: 2012-07-05 16:21    [W:0.024 / U:4.196 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site