[prev in list] [next in list] [prev in thread] [next in thread]
List: lxc-devel
Subject: [lxc-devel] [lxc/lxc] 91bc7f: confile: improve strprint()
From: GitHub <noreply () github ! com>
Date: 2018-05-30 16:41:41
Message-ID: 5b0ed445689df_76d92ad94eda9c18266fd () hookshot-fe-88eb02d ! cp1-iad ! github ! net ! mail
[Download RAW message or body]
Branch: refs/heads/stable-3.0
Home: https://github.com/lxc/lxc
Commit: 91bc7fb0d3f3eae129cfe825ce667b39a4736906
https://github.com/lxc/lxc/commit/91bc7fb0d3f3eae129cfe825ce667b39a=
4736906
Author: Christian Brauner <christian.brauner@ubuntu.com>
Date: 2018-05-30 (Wed, 30 May 2018)
Changed paths:
M src/lxc/confile_utils.h
Log Message:
-----------
confile: improve strprint()
POSIX specifies [1]:
"If the value of n is zero on a call to snprintf(), nothing shall be writ=
ten,
the number of bytes that would have been written had n been sufficiently =
large
excluding the terminating null shall be returned, and s may be a null poi=
nter."
But in case there are any non-sane libcs out there that do actually deref=
erence
the buffer when when 0 is passed as length to snprintf() let's give them =
a
dummy buffer.
[1]: The Open Group Base Specifications Issue 7, 2018 edition
IEEE Std 1003.1-2017 (Revision of IEEE Std 1003.1-2008)
Copyright =C2=A9 2001-2018 IEEE and The Open Group
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Reported-by: Donghwa Jeong <dh48.jeong@samsung.com>
**NOTE:** This service been marked for deprecation: https://develop=
er.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019=
.
[Attachment #3 (text/plain)]
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic