You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If primary generates an error it generates an immediate 0, but does not set lval->symbol and lval->indirect to 0, which causes a memory scribble and can crash.
Also symname should only copy NAMEMAX bytes then discard the remainder
And fix_include_name() should use strncat/strlcat
The top one is an annoying bug, the others are more of an amusement but do mean I can feed scc8080 source code that forks a shell and executes arbitrary code!
The text was updated successfully, but these errors were encountered:
I've found a couple of other blind copies to symbol->name as well since then
Getting a somewhat modified version of it (ANSIfied to find all the type mismatches etc) up and running on Fuzix as a native small compiler. Been adding Z80 and other bits to it - much fun.
I changed the end of primary to the following to fix the crashes
If primary generates an error it generates an immediate 0, but does not set lval->symbol and lval->indirect to 0, which causes a memory scribble and can crash.
Also symname should only copy NAMEMAX bytes then discard the remainder
And fix_include_name() should use strncat/strlcat
The top one is an annoying bug, the others are more of an amusement but do mean I can feed scc8080 source code that forks a shell and executes arbitrary code!
The text was updated successfully, but these errors were encountered: