Go to file
Marco Vanotti 6224dd0b45 preproc: don't unmacro if macro cannot be found.
This commit adds a check to see if the macro that we want to unmacro exists.
A previous commit, introduced a check to see if the unmacro was undefining a macro being expanded, but that same check included a null pointer dereference if the macro to undefine did not exist.

The following code reproduced the issue:

```asm
%macro baz 0
  %unmacro F 0
%endmacro
baz
```

Compile with:
```shell
$ nasm -f elf64 -g -FDWARF -o tmp.o -werror file.asm
```

[hpa: adjusted code to match NASM style]

Fixes bug 3392761

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-07 16:30:49 -08:00
asm preproc: don't unmacro if macro cannot be found. 2022-11-07 16:30:49 -08:00
autoconf Merge remote-tracking branch 'ElyesH/typos' 2022-11-07 12:39:44 -08:00
common Add {rex} prefix, simplify prefix handling, better error messages 2021-04-27 11:37:42 -07:00
config config/unconfig.h: still needs to be in the repository 2020-07-08 08:53:28 -07:00
contrib
disasm fp16: fix incorred handling of broadcast flags 2022-11-07 16:24:39 -08:00
doc Merge remote-tracking branch 'ElyesH/typos' 2022-11-07 12:39:44 -08:00
headers
include fp16: fix incorred handling of broadcast flags 2022-11-07 16:24:39 -08:00
macros Merge remote-tracking branch 'ElyesH/typos' 2022-11-07 12:39:44 -08:00
misc Merge remote-tracking branch 'ElyesH/typos' 2022-11-07 12:39:44 -08:00
Mkfiles output/coff: Support for COMDAT sections 2021-12-17 23:45:25 +03:00
nasmlib Merge remote-tracking branch 'ElyesH/typos' 2022-11-07 12:39:44 -08:00
nsis Fix some typos 2022-01-09 17:34:35 +01:00
output Merge remote-tracking branch 'johannkoenig/master' 2022-11-07 12:54:22 -08:00
perllib Fix some typos 2022-01-09 17:34:35 +01:00
rdoff Merge remote-tracking branch 'ElyesH/typos' 2022-11-07 12:39:44 -08:00
stdlib vsnprintf.c: fix printing of a size_t variable 2020-07-09 17:44:21 -07:00
test Merge remote-tracking branch 'ElyesH/typos' 2022-11-07 12:39:44 -08:00
tools Fix some typos 2022-01-09 17:34:35 +01:00
travis travis: update COFF tests to not expect an embedded filename 2022-11-07 16:18:50 -08:00
x86 Merge remote-tracking branch 'Gramner/vpexpand' 2022-11-07 16:28:12 -08:00
.gitattributes gitattributes: don't try to merge the version file 2020-06-30 13:48:13 -07:00
.gitignore .gitignore: ignore timestamp (*.time) files 2020-09-11 16:28:57 -07:00
.travis.yml travis: Disable osx for a while 2018-10-17 21:40:14 +03:00
AUTHORS
autogen.sh autogen.sh: don't rely on sed -r 2020-07-12 06:03:58 -07:00
ChangeLog Fix some typos 2022-01-09 17:34:35 +01:00
CHANGES
configure.ac quote_for_pmake: fix counter underrun resulting in segfault 2022-11-07 10:26:03 -08:00
INSTALL Fix some typos 2022-01-09 17:34:35 +01:00
LICENSE
Makefile.in output/coff: Support for COMDAT sections 2021-12-17 23:45:25 +03:00
nasm.spec.in nasm.spec.in: need perl; .pdf.xz now build by standard Makefile 2020-06-04 17:17:28 -07:00
nasm.spec.sed
nasm.txt Fix some typos 2022-01-09 17:34:35 +01:00
ndisasm.txt
README.md doc: remove references to sourceforge 2020-07-01 21:48:44 -07:00
SubmittingPatches
version NASM 2.16rc1 2022-10-05 12:15:06 -07:00
version.pl preproc: standard macros now C-safe, %aliases off, fix %? recursion 2019-08-27 16:42:41 -07:00

NASM, the Netwide Assembler

master

Many many developers all over the net respect NASM for what it is: a widespread (thus netwide), portable (thus netwide!), very flexible and mature assembler tool with support for many output formats (thus netwide!!).

Now we have good news for you: NASM is licensed under the "simplified" (2-clause) BSD license. This means its development is open to even wider society of programmers wishing to improve their lovely assembler.

Visit our nasm.us website for more details.

With best regards, the NASM crew.