Displaying 20 results from an estimated 153 matches for "vsprintf".
Did you mean:
sprintf
2020 Mar 28
0
[klibc:master] Suppress format truncation warnings for sprintf() and vsprintf()
...95a1bff2639f9ede9eae9b07b53f37bdac
Author: Ben Hutchings <ben at decadent.org.uk>
AuthorDate: Sat, 28 Mar 2020 21:57:26 +0000
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 28 Mar 2020 21:57:26 +0000
[klibc] Suppress format truncation warnings for sprintf() and vsprintf()
These functions pass a huge maximum size to the corresponding
length-limiting functions. gcc warns about this and suggests that
we should pass INT_MAX at most. I don't think this is correct, so
suppress the warnings.
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/kl...
2000 Nov 08
1
openssh-2.3.0p1 bug: vsprintf("%h") is broken
I discovered this in openssh-2.3.0p1; it may affect earlier versions as
well.
Platforms: Solaris 2.5.1 and 8, probably others.
Observed behaviour:
With -v, when attempting to connect to a host which is not
listening on the requested port, I noticed that the port number is
reported as zero in the message:
Secure connection to hostname on port 0 refused.
Apparent cause:
At line
1997 Jul 17
0
KSR[T] Advisory #2: ld.so
...ID #: lin-ldso-002
Operating System(s): Linux
Affected Program: ld.so / ld-linux.so
Problem Description: ld.so is the run-time linker used by dynamically linked
executables(a.out). Inside the error reporting function
there is a call to vsprintf, which doesn''t check the size
of the string it is storing in an automatic buffer.
The ELF version of run-time linker(ld-linux.so) is
vulnerable to an almost identical stack overwrite.
Compromise: A local user that ca...
2017 Feb 25
2
lli can't find vsprintf
...omeone could give me some tips on how to debug/solve
this problem. I am trying to use LLI on Windows. I build llvm and clang
using cmake.
clang -c hello.c -emit-llvm -o hello.bc
lli hello.bc
D:\llvm\examples\helloworld>lli hello.bc
LLVM ERROR: Program used external function '___stdio_common_vsprintf' which
could not be resolved!
But, I can generate the exe though
llc -filetype=obj hello.bc
link hello.obj -defaultlib:libcmt
maybe i need a
D:\llvm\examples\helloworld>clang --version
clang version 5.0.0 (trunk 296084) (llvm/trunk 296083)
Target: i686-pc-windows-msvc
Thread model: posix
I...
1997 Jul 08
3
so-called snprintf() in db-1.85.4
Hi,
There is a severe problem with the db-1.85.4 library''s Linux
port that can be found on sunsite.unc.edu under
/pub/Linux/libs/db-1.85.4-src.tar.gz (sp?): This library
contains a "snprintf" function which breaks down to a common
sprintf, ignoring the size parameter. Obviously, this was
thought to be a terribly bad work-around for C libraries which
don''t contain an
2016 Aug 18
5
[PATCH v2 0/4] New getprogname module
...-
modules/uniname/uniname-tests | 1 -
modules/uninorm/nfc-tests | 1 -
modules/uninorm/nfd-tests | 1 -
modules/uninorm/nfkc-tests | 1 -
modules/uninorm/nfkd-tests | 1 -
modules/unistdio/u16-vsnprintf-tests | 1 -
modules/unistdio/u16-vsprintf-tests | 1 -
modules/unistdio/u32-vsnprintf-tests | 1 -
modules/unistdio/u32-vsprintf-tests | 1 -
modules/unistdio/u8-vsnprintf-tests | 1 -
modules/unistdio/u8-vsprintf-tests | 1 -
modules/unistdio/ulc-vsnprintf-tests | 1 -
modules/unistdio/ulc-vsprintf-tests | 1 -
modules...
2013 Dec 27
0
[PATCH] Update header locations for uapi & generated
...py of the kernel sources,
configured.
in the kernel dir:
emake headers_install INSTALL_HDR_PATH="${WORKDIR}"/linux-headers/
in the klibc dir:
emake V=1 KLIBCKERNELSRC="${S}/linux/usr" (plus the rest of the opts)
and the failure:
x86_64-pc-linux-gnu-gcc -Wp,-MD,usr/klibc/.vsprintf.o.d -nostdinc -iwithprefix include -I/dev/shm/portage/dev-libs/klibc-2.0.3-r1/work/klibc-2.0.3/usr/include/arch/x86_64 -Iusr/include/arch/x86_64 -I/dev/shm/portage/dev-libs/klibc-2.0.3-r1/work/klibc-2.0.3/usr/include/bits64 -Iusr/include/bits64 -I/dev/shm/portage/dev-libs/klibc-2.0.3-r1/work/klibc...
2014 Sep 18
3
patch for win_utf8_io.c: vsnprintf_s vs. MinGW
..._s isn't always available on MinGW platform:
> MinGW declares this function only if MINGW_HAS_SECURE_API macro is defined.
> That's because WinXP version of msvcrt.dll doesn't contain secure functions
> like vsnprintf_s.
>
> Maybe it's better to revert vsnprintf_s to vsprintf or to use vnsprintf?
Ok, we need to drop vsnprintf_s to support WinXP. I'd prefer vsnprintf
over vsprintf but have no way of testing any of these options.
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
2014 Aug 09
3
[PATCH] for win_utf8_io.c
Janne Hyv?rinen wrote:
> Some comments for patch #1, I chose the non-secure versions because they
> are faster and produce smaller binary. The functions where these
> printings are performed can't in my opinion ever exceed the safety
> margin of 32 KB. They print short help and error texts and occasionally
> filename, which with APIs is restricted to 260 characters. And you
2017 Feb 27
2
lli can't find vsprintf
...imilar error
on linking if i remove the libcmt
D:\llvm\examples\helloworld>lli -load=libcmt hello.bc
Error opening 'libcmt': libcmt: Can't open: The specified module could not
be found. (0x7E)
-load request ignored.
LLVM ERROR: Program used external function '___stdio_common_vsprintf' which
could not be resolved!
D:\llvm\examples\helloworld>link hello.obj
Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation. All rights reserved.
hello.obj : error LNK2019: unresolved external symbol ___acrt_iob_func
referenced in function _printf...
2014 Aug 08
4
[PATCH] for win_utf8_io.c
For better readability the patch is divided by 3 parts.
Part #1: for a bit better security replace
vsprintf(utmp, format, argptr)
with
vsnprintf_s(utmp, 32768, _TRUNCATE, format, argptr)
Part #2: potential memleak fixed: utf8argv[i] are not freed
when utf8argv itself is freed.
Part #3: 'if (ret != 0) break;' line seems redundant.
-------------- next part --------------
A non-text attachm...
2013 Dec 27
2
[PATCH] Update header locations for uapi & generated
On 12/26/2013 07:27 PM, Robin H. Johnson wrote:
> (please CC me, I'm not on the klibc list, and I didn't get HPA's
> response to my post).
>
> On Fri, Dec 27, 2013 at 12:24:34AM +0000, Thorsten Glaser wrote:
>> H. Peter Anvin dixit:
>>> You should be using the output of "make headers_install" to build klibc.
> That makes easy cross-building a
2014 Sep 19
0
vsnprintf_s and vsnprintf
...available on MinGW platform:
>> MinGW declares this function only if MINGW_HAS_SECURE_API macro is defined.
>> That's because WinXP version of msvcrt.dll doesn't contain secure functions
>> like vsnprintf_s.
>>
>> Maybe it's better to revert vsnprintf_s to vsprintf or to use vnsprintf?
>
> Ok, we need to drop vsnprintf_s to support WinXP. I'd prefer vsnprintf
> over vsprintf but have no way of testing any of these options.
I wrote a small program that fills a buffer[] with "abcdefghijklmnopqrstuvwxyz\0"
pattern and then tries to write...
2007 Apr 12
2
[PATCH] Make com32 printf obey width-restriction on %s
...ecmp.o strncat.o strncmp.o strncpy.o strndup.o \
+ strncasecmp.o strncat.o strncmp.o strncpy.o strndup.o strnlen.o \
strntoimax.o strntoumax.o strrchr.o strsep.o strspn.o strstr.o \
strtoimax.o strtok.o strtol.o strtoll.o strtoul.o strtoull.o \
strtoumax.o vfprintf.o vprintf.o vsnprintf.o vsprintf.o \
--- syslinux-3.36/com32/lib/vsnprintf.c.orig 2007-02-10
21:47:08.000000000 +0100
+++ syslinux-3.36/com32/lib/vsnprintf.c 2007-04-12 12:08:54.000000000 +0200
@@ -362,7 +362,7 @@
case 's': /* String */
sarg = va_arg(ap, const char *);
sarg = sarg ? sarg : "(null)"...
2000 Jun 27
1
openssh-2.1.1p1 on Irix6.2 report
...usr/local/bin/ssh\" -DSSH_ASKPASS_DEFAULT=\"/usr/local/libexec/ssh/ssh-askpass\" -DHAVE_CONFIG_H -c bsd-snprintf.c
"bsd-snprintf.c", line 149: warning(1164): argument of type "va_list *" is
incompatible with parameter of type "char *"
ret = vsprintf(p, fmt, ap);
^
"bsd-snprintf.c", line 176: warning(1177): argument is incompatible with
formal parameter
return (vsnprintf(str, n, fmt, ap));
^
>From my read of the headers and manpages, there's a superfluo...
2005 Nov 27
1
segfault on write.dcf with gzfile connection
...uot;test.gz", "wt")
write.dcf(desc, file=con)
close(con)
where BAD has a long field (see below for example). The crash happens
inside dummy_vfprintf. I think the issue is that the va_list ap is
modified by the first vsnprintf call (connections.c:190) and the
subsequent vsprintf call (connections.c:194) gets an invalid va_list
arg.
The following patch improves things for me, but I've not tested on
other platforms.
Index: connections.c
===================================================================
--- connections.c (revision 36434)
+++ connections.c...
2004 Feb 19
1
Problem with CIFS on Linux-2.4.22
...fa667939 00000001 f68dce60 ef638020 ef638020
> Feb 3 13:47:51 merlin kernel: eee0bdd4 00000000 ffffffff
> 00000000 00000000 ef638020 ef638020 00000000
> Feb 3 13:47:51 merlin kernel: Call Trace: [<fa67916e>] [<fa685bcc>]
> [<fa667939>] [<fa66e19d>] [vsprintf+22/32]
> Feb 3 13:47:51 merlin kernel: [<fa685f47>] [sprintf+20/32]
> [<fa685f3c>] [<fa66ea57>] [<fa4f0ae0>] [handle_mm_fault+86/192]
> Feb 3 13:47:51 merlin kernel: [alloc_super+44/352] [<fa667081>]
> [<fa6898f0>] [get_sb_nodev+56/128] [<f...
2018 Nov 30
8
[PATCH RFC 00/15] Zero ****s, hugload of hugs <3
...| 8 ++++---
drivers/mtd/mtd_blkdevs.c | 2 +-
drivers/net/ethernet/sun/sunhme.c | 4 ++--
drivers/scsi/qlogicpti.h | 2 +-
fs/notify/inotify/inotify_user.c | 2 +-
kernel/irq/timings.c | 2 +-
lib/vsprintf.c | 2 +-
net/core/skbuff.c | 2 +-
17 files changed, 33 insertions(+), 31 deletions(-)
--
2.19.1
2023 Jan 26
0
[klibc:time64] time: Use clock_* system calls for time-of-day and sleep
...f int timer_t;
+typedef __kernel_clockid_t clockid_t;
typedef __kernel_uid32_t uid_t;
typedef __kernel_gid32_t gid_t;
diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
index 02a18e64..8b132190 100644
--- a/usr/klibc/Kbuild
+++ b/usr/klibc/Kbuild
@@ -29,7 +29,8 @@ klib-y += vsnprintf.o snprintf.o vsprintf.o sprintf.o \
statfs.o fstatfs.o umount.o \
creat.o open.o openat.o \
fread2.o fwrite2.o fgets.o fputc.o fputs.o puts.o putchar.o \
- sleep.o usleep.o strtotimespec.o strtotimeval.o \
+ clock_nanosleep.o nanosleep.o sleep.o usleep.o \
+ strtotimespec.o strtotimeval.o \
raise.o...
2011 Feb 27
4
[PATCH] Add minimal mkstemp(3) implementation.
...rn int mkstemp(char *);
+
/* Basic PTY functions. These only work if devpts is mounted! */
__extern int unlockpt(int);
diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
index af40367..62a3268 100644
--- a/usr/klibc/Kbuild
+++ b/usr/klibc/Kbuild
@@ -18,7 +18,7 @@ klib-y := vsnprintf.o snprintf.o vsprintf.o sprintf.o \
setpgrp.o getpgrp.o daemon.o \
printf.o vprintf.o fprintf.o vfprintf.o perror.o \
statfs.o fstatfs.o umount.o \
- creat.o open.o openat.o open_cloexec.o \
+ creat.o mkstemp.o open.o openat.o open_cloexec.o \
fopen.o fread.o fread2.o fgetc.o fgets.o \
fwrite.o f...