Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 12 Apr 2012 02:42:59 +0200
From: Robert Vežnaver <robert.veznaver@...il.com>
To: john-dev@...ts.openwall.com
Subject: Usage of mempcpy in cryptsha512_fmt.c and cryptsha256_fmt.c

Hi,

there seems to be a problem with the latest jumbo-unstable, specifically: the usage of mempcpy in cryptsha512_fmt.c and cryptsha256_fmt.c.
Since mempcpy is a GNU extension it appears that it is not supported in OS X (and probably some BSDs as well), so it cannot compile.

There seems to be 2 solutions to this problem:
1)
#ifdef __APPLE__
void* mempcpy(void* dst, const void* src, size_t len) {
  return (char*)memcpy(dst, src, len) + len;
}
#endif

2)
replace:
	cp = mempcpy (cp, temp_result, BINARY_SIZE);
with:
	cp = (char *) memcpy (cp, temp_result, BINARY_SIZE) + BINARY_SIZE;

Solution 2 seems cleaner to me.

Cheers,
Robert

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.