[Patch] SDL-1.2 SDL_revcpy() asm patch for the cld flag

Hi,

as reported through the FreeBSD bug tracking system in SDL 1.2.13 (and
in the 1.2 branch, if I see that correctly) the SDL_revcpy() macro sets
the direction flag (std), but does not clear it afterwards (cld), which
is wrong according to the GCC and SYS V specs. This can cause some
weird side effects, which in turn can lead to memory corruption.

You can read the full report with a detailed description and test
program at http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/120052

Attached is the submitted patch, which fixes the issue.

Regards
Marcus
-------------- next part --------------
A non-text attachment was scrubbed…
Name: std_cld.diff
Type: text/x-diff
Size: 347 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20080202/5c88c23c/attachment.diff
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20080202/5c88c23c/attachment.pgp

as reported through the FreeBSD bug tracking system in SDL 1.2.13 (and
in the 1.2 branch, if I see that correctly) the SDL_revcpy() macro sets
the direction flag (std), but does not clear it afterwards (cld), which
is wrong according to the GCC and SYS V specs. This can cause some
weird side effects, which in turn can lead to memory corruption.

Fixed in svn revision #3535 for the 1.2 branch, and #3536 for the 1.3
branch, thanks!

–ryan.