Share

ATasm: 6502 cross-assembler

Tracker: Bugs

5 snprintf with len=256 into buffer with len=80 - ID: 1809099
Last Update: Attachment added ( horakdan )

There is a bug which comes out when atasm is compiled with buffer overflow
checking. In function get_expression() from setparse.c there is a snprintf
call with max length = 256 into a buffer with length of 80 chars.

The result of running atasm:

./atasm ../tests/testraw.m65
ATasm 1.05 beta (A mostly Mac65 compatible 6502 cross-assembler)
Pass 1: *** buffer overflow detected ***: ./atasm terminated
======= Backtrace: =========
...

A fix is attached.

PS: This is a result of a package preparation for Fedora Linux.


Dan Horak ( horakdan ) - 2007-10-07 19:26

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File ( 1 )

Filename Description Download
atasm-1.05-buffer.patch patch to solve buffer overflow in setparse.c Download

Change ( 1 )

Field Old Value Date By
File Added 248656: atasm-1.05-buffer.patch 2007-10-07 19:26 horakdan