View Single Post
  #6   (View Single Post)  
Old 13th April 2009
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

Hmm, I wonder if errno gets set to anything useful.

Code:
$ vim t.c
$ dd if=/dev/zero of=infile bs=2352 count=9
$ gcc t.c -o t && ./t
where = 0
where = 2352
1:  nr = 2352
2:  nr = 2352
3:  nr = 2352
4:  nr = 2352
5:  nr = 2352
6:  nr = 2352
7:  nr = 2352
8:  nr = 608
9:  nr = 0
$ uname -rms
7.2-PRERELEASE
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote