GNU bug report logs -
#50155
don't use the conversion specifier %n in emacsclient
Previous Next
Reported by: Omar Polo <op <at> omarpolo.com>
Date: Sat, 21 Aug 2021 21:39:01 UTC
Severity: normal
Tags: patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Tags: patch
Hello,
The usage of the %n conversion specifier for printf(3) is widely
discouraged (see [0] for instance). The OpenBSD libc in particular
logs to syslog every time an application tries to use %n.
Now, in this specific case it's used in a completely safe manner, but
avoiding it seems pretty easy.
Another option would be
char *emacsdirend = strchr(sockname + tmpdirlen + 1, '/');
but I'm not sure it would be cleaner.
Thanks,
Omar Polo
[0]: https://man.bsd.lv/Linux-5.06/printf.3#BUGS
In GNU Emacs 28.0.50 (build 11, x86_64-unknown-openbsd6.9, X toolkit, cairo version 1.16.0, Xaw scroll bars)
of 2021-08-17 built on venera
Windowing system distributor 'The X.Org Foundation', version 11.0.12010000
System Description: OpenBSD venera 6.9 GENERIC.MP#158 amd64
Configured using:
'configure --prefix=/home/op/opt/emacs --with-x-toolkit=lucid CC=cc'
[0001-don-t-use-n.patch (text/patch, attachment)]
This bug report was last modified 3 years and 274 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.