From 6aec5c9611d6a3bee35d2e31fd2dd59a8cebcc50 Mon Sep 17 00:00:00 2001 From: didg Date: Sat, 10 Jul 2004 02:15:29 +0000 Subject: [PATCH] More tests for broken resource forks. --- libatalk/adouble/ad_open.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libatalk/adouble/ad_open.c b/libatalk/adouble/ad_open.c index 44aeb5ef..9c6d2398 100644 --- a/libatalk/adouble/ad_open.c +++ b/libatalk/adouble/ad_open.c @@ -1,5 +1,5 @@ /* - * $Id: ad_open.c,v 1.30.6.14 2004-05-11 08:28:33 didg Exp $ + * $Id: ad_open.c,v 1.30.6.15 2004-07-10 02:15:29 didg Exp $ * * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) * Copyright (c) 1990,1991 Regents of The University of Michigan. @@ -516,7 +516,7 @@ static void parse_entries(struct adouble *ad, char *buf, len = ntohl( len ); buf += sizeof( len ); - if ( 0 < eid && eid < ADEID_MAX ) { + if ( 0 < eid && eid < ADEID_MAX && off < sizeof(ad->ad_data) && off +len <= sizeof(ad->ad_data)) { ad->ad_eid[ eid ].ade_off = off; ad->ad_eid[ eid ].ade_len = len; } else if (!warning) { -- 2.39.2