Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 29 Jan 2013 01:28:57 +0400
From: Solar Designer <>
Subject: Re: dmg2john

On Mon, Jan 28, 2013 at 11:22:24PM +0200, Milen Rangelov wrote:
> I apologize because it came from my poor code.

Oh, bugs do happen.  No need to apologize.

> 		cno = ceil(header2.datasize / 4096.0) - 2;
> 		chunk = (unsigned char *) malloc(header2.datasize);
> 		data_size = header2.datasize - cno * 4096;
> 		if (data_size < 0) {

So I suggested in the Twitter thread that folks try size_t for now, but
the correct fix would be different, so that the sanity check is not
removed.  Perhaps use ssize_t or "long long", or rewrite the check.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.