From bdad99cc1c1f99235a89f9bc85961b1e80b7b903 Mon Sep 17 00:00:00 2001 From: luoqi Date: Tue, 4 May 1999 16:59:42 +0000 Subject: Uninitialized variable. Do not assume certain endianess. --- contrib/pnpinfo/pnpinfo.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'contrib/pnpinfo') 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 @@ -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)) -- cgit v1.1