Vegard Nossum
2dfd937d7f
Prevent lexer from reading beyond the end of the buffer
...
On Linux, valgrind complains about the overflow like this:
Pass 1...
==20054== Invalid read of size 1
==20054== at 0x406CDA: yylex (lexer.c:396)
==20054== by 0x40207C: yyparse (asmy.c:2921)
==20054== by 0x4086AF: main (main.c:351)
==20054== Address 0x503a102 is 0 bytes after a block of size 23,538 alloc'd
==20054== at 0x402994D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20054== by 0x406411: yy_create_buffer (lexer.c:147)
==20054== by 0x404FE3: fstk_RunInclude (fstack.c:243)
==20054== by 0x4025F5: yyparse (asmy.y:744)
==20054== by 0x4086AF: main (main.c:351)
==20054==
This is a bit of a crude fix which simply exits the hashing loop when
we reach the end of the string. We should probably do some kind of
length calculation on the buffer instead.
Signed-off-by: Vegard Nossum <[email protected] >
2012-10-21 06:06:54 +02:00
Vegard Nossum
eb4f790a82
Include getopt.h (fix compilation on GNU/Linux)
...
Signed-off-by: Vegard Nossum <[email protected] >
2012-10-21 06:05:30 +02:00
Vegard Nossum
74eea59208
build: figure out git revision and include as part of version string
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 10:24:12 +02:00
Vegard Nossum
98810091da
build: split cflags to its own variable
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 10:10:12 +02:00
Vegard Nossum
f81bcc722a
build: merge everything to a single top-level Makefile
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 10:08:32 +02:00
Vegard Nossum
3ce06cd424
Added a README file
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 09:53:33 +02:00
Vegard Nossum
a216855093
Move src/asmotor.h to top-level include/
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 09:29:07 +02:00
Vegard Nossum
afe33e1162
link: move includes to include/link/
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 09:22:49 +02:00
Vegard Nossum
618082bcab
lib: move includes to include/lib/
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 09:18:21 +02:00
Vegard Nossum
cd779b9511
asm: moved includes to include/asm/
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 09:14:19 +02:00
Vegard Nossum
26150fa9d4
asm: add newlines to the ends of yaccprt[134].y
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 09:05:39 +02:00
Vegard Nossum
85f382ffad
asm: run dos2unix on yaccprt1.y
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 09:03:53 +02:00
Vegard Nossum
c6d8069eed
rgbfix: use mkstemp() instead of tmpnam() and fix coding style issues
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 08:59:03 +02:00
Vegard Nossum
bc6b2fe005
link: add missing parameter to error message
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 08:53:18 +02:00
Vegard Nossum
3c82b1ae03
Fixed warnings and some style issues
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 08:51:55 +02:00
Vegard Nossum
b6c749ffbd
Run `indent' on the whole tree
...
Can't indent the .y files yet, they need special treatment.
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 07:59:46 +02:00
Vegard Nossum
660f5daac3
Add .gitignore files
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 07:40:13 +02:00
Vegard Nossum
94fad97aed
Switch line terminators from CRLF to LF
...
Argh, that obnoxious platform again... ;-)
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 07:32:12 +02:00
Vegard Nossum
0d9739535e
Use spaces instead of tabs after CPP directives
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 07:26:46 +02:00
Vegard Nossum
0ce5efb3c5
build: remove obsolete objs* directories
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 07:17:03 +02:00
Vegard Nossum
0b65d01289
build: add top-level Makefile
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 07:11:30 +02:00
Vegard Nossum
1a98f20535
rgbfix: improve Makefile
...
Make object filename explicit and add "clean" target.
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 07:10:44 +02:00
Vegard Nossum
322a0b05d8
link: improve Makefile
...
Make object filenames explicit and add "clean" target.
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 07:09:27 +02:00
Vegard Nossum
c0a9cf79a3
lib: improve Makefile
...
Make object files explicit and add "clean" target.
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 07:07:17 +02:00
Vegard Nossum
48c34238eb
asm: improve Makefile
...
Make the generated object files explicit and add a "clean" target.
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 07:04:47 +02:00
Vegard Nossum
e12cb95079
build: rip out obsolete makefiles for obsolete platforms
...
We don't support DOS/Win32, so these are not needed anymore...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 06:58:39 +02:00
Vegard Nossum
8a7adf4c3b
rgbfix: make rgbfix compile for Linux
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 06:57:16 +02:00
Vegard Nossum
4d06e6de79
link: make xlink compile for Linux
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 06:56:20 +02:00
Vegard Nossum
c31b87b16a
lib: make xlib compile on Linux
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 06:55:26 +02:00
Vegard Nossum
1024c30866
asm: make rgbasm compile on Linux
...
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 06:50:48 +02:00
Vegard Nossum
b53e170781
Make all file names lowercase
...
This fixes a zip/platform artifact.
Signed-off-by: Vegard Nossum <[email protected] >
2009-06-11 06:25:27 +02:00