diff options
Diffstat (limited to 'drivers/isdn/i4l/isdn_bsdcomp.c')
| -rw-r--r-- | drivers/isdn/i4l/isdn_bsdcomp.c | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/isdn/i4l/isdn_bsdcomp.c b/drivers/isdn/i4l/isdn_bsdcomp.c index 99012c047751..7f28b967ed19 100644 --- a/drivers/isdn/i4l/isdn_bsdcomp.c +++ b/drivers/isdn/i4l/isdn_bsdcomp.c @@ -340,7 +340,7 @@ static void *bsd_alloc(struct isdn_ppp_comp_data *data)  	 * Allocate space for the dictionary. This may be more than one page in  	 * length.  	 */ -	db->dict = vmalloc(hsize * sizeof(struct bsd_dict)); +	db->dict = vmalloc(array_size(hsize, sizeof(struct bsd_dict)));  	if (!db->dict) {  		bsd_free(db);  		return NULL; @@ -353,7 +353,8 @@ static void *bsd_alloc(struct isdn_ppp_comp_data *data)  	if (!decomp)  		db->lens = NULL;  	else { -		db->lens = vmalloc((maxmaxcode + 1) * sizeof(db->lens[0])); +		db->lens = vmalloc(array_size(sizeof(db->lens[0]), +					      maxmaxcode + 1));  		if (!db->lens) {  			bsd_free(db);  			return (NULL);  |