diff options
author | luoqi <luoqi@FreeBSD.org> | 1999-05-04 16:59:42 +0000 |
---|---|---|
committer | luoqi <luoqi@FreeBSD.org> | 1999-05-04 16:59:42 +0000 |
commit | bdad99cc1c1f99235a89f9bc85961b1e80b7b903 (patch) | |
tree | ccd9d0917513bc2fa92494cfda13a5f610aef72a /contrib | |
parent | 2085d1a0500e60ec06a7ca2ded31bde3fe581bd6 (diff) | |
download | FreeBSD-src-bdad99cc1c1f99235a89f9bc85961b1e80b7b903.zip FreeBSD-src-bdad99cc1c1f99235a89f9bc85961b1e80b7b903.tar.gz |
Uninitialized variable. Do not assume certain endianess.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/pnpinfo/pnpinfo.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/pnpinfo/pnpinfo.c b/contrib/pnpinfo/pnpinfo.c index 6218fa1..7c1751f 100644 --- a/contrib/pnpinfo/pnpinfo.c +++ b/contrib/pnpinfo/pnpinfo.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: pnpinfo.c,v 1.2 1997/11/12 08:48:13 jmg Exp $ + * $Id: pnpinfo.c,v 1.3 1998/09/13 22:15:44 eivind Exp $ */ #include <sys/time.h> @@ -501,9 +501,10 @@ dump_resdata(u_char *data, int csn) free(resinfo); } else { /* Handle large resouce data types */ - - if (!get_resource_info((char *) &large_len, 2)) + u_char buf[2]; + if (!get_resource_info((char *)buf, 2)) break; + large_len = (buf[1] << 8) + buf[0]; resinfo = malloc(large_len); if (!get_resource_info(resinfo, large_len)) |