summaryrefslogtreecommitdiffstats
path: root/etc/rc.initdiskless
diff options
context:
space:
mode:
authorse <se@FreeBSD.org>2003-10-11 22:20:34 +0000
committerse <se@FreeBSD.org>2003-10-11 22:20:34 +0000
commit6a55ff3777d67df18d8d315cd2f925b3722db494 (patch)
treeab158dd9e3d330995e61b587d399b5263231a54c /etc/rc.initdiskless
parent5b9cc4b22e6e819a64dfbf8705d2602d2bab874a (diff)
downloadFreeBSD-src-6a55ff3777d67df18d8d315cd2f925b3722db494.zip
FreeBSD-src-6a55ff3777d67df18d8d315cd2f925b3722db494.tar.gz
The code that was meant to test alignment of the register offset
parameter in the read and write case dereferenced an unitialized pointer and can't possibly ever have catched an actual invalid argument. This was apparently true for the read/write and getconf cases. The latter does not even receive the paramter that is to be verified. I'm surprised that this did not cause kernel panics, but it seems that the uninitialized local variable happens to contain data that may be used as a pointer to memory that satisfies the test condition. Make the code work as intended by moving the test inside the switch case where the pointer has been properly initialized. Since the read and write case shared just about all code (except for the single call to PCIB_READ_CONFIG resp. PCIB_WRITE_CONFIG) I have merged both cases. Noticed by: trhodes@FreeBSD.org (Tom Rhodes)
Diffstat (limited to 'etc/rc.initdiskless')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud