HomeClusterLabs Projects

[IPv6addr] Handle scanf failures in scan_if()

Description

[IPv6addr] Handle scanf failures in scan_if()
If for some reason the file being scanned is malformed, or
overflows one of the feilds for some reason, scanf will neither
return EOF nor fill in all of its parameters correctly. In the
case that I observed this resulted in an endless loop.

This simple fix just bails out in this case.
Perhaps an error message is in order?

--HG--
extra : convert_revision : 31d19acfd1b95134d7484f3ba72425f492a808d5

Details

Provenance
Horms <horms@verge.net.au>Authored on Apr 18 2007, 11:33 PM
Parents
rR6a33e4f73c41: [IPv6addr] devname in scan_if() is too short
Branches
Unknown
Tags
Unknown

Event Timeline