Statistics
| Branch: | Revision:

root @ 2e679780

Name Size
  QMP
  audio
  block
  bsd-user
  default-configs
  docs
  fpu
  fsdev
  gdb-xml
  hw
  include
  libcacard
  linux-headers
  linux-user
  net
  pc-bios
  qapi
  qga
  qom
  roms
  scripts
  slirp
  sysconfigs
  target-alpha
  target-arm
  target-cris
  target-i386
  target-lm32
  target-m68k
  target-microblaze
  target-mips
  target-openrisc
  target-ppc
  target-s390x
  target-sh4
  target-sparc
  target-unicore32
  target-xtensa
  tcg
  tests
  trace
  ui
.exrc 220 Bytes
.gitignore 1.3 kB
.gitmodules 602 Bytes
.mailmap 1.2 kB
CODING_STYLE 3.1 kB
COPYING 17.6 kB
COPYING.LIB 25.8 kB
Changelog 22.6 kB
HACKING 4.9 kB
LICENSE 519 Bytes
MAINTAINERS 13.1 kB
Makefile 14.4 kB
Makefile.dis 319 Bytes
Makefile.hw 471 Bytes
Makefile.objs 8 kB
Makefile.target 5.5 kB
Makefile.user 463 Bytes
README 80 Bytes
TODO 1.1 kB
VERSION 7 Bytes
a.out.h 13.6 kB
acl.c 4.4 kB
acl.h 2.1 kB
aes.c 59.7 kB
aes.h 717 Bytes
aio.c 4.9 kB
alpha-dis.c 79.8 kB
alpha.ld 3.9 kB
arch_init.c 27.1 kB
arch_init.h 945 Bytes
arm-dis.c 157.1 kB
arm.ld 4.6 kB
async.c 3.4 kB
balloon.c 3.7 kB
balloon.h 678 Bytes
bitmap.c 6.3 kB
bitmap.h 7.3 kB
bitops.c 3.4 kB
bitops.h 9.5 kB
block-migration.c 20.1 kB
block-migration.h 504 Bytes
block.c 121 kB
block.h 16.8 kB
block_int.h 12.9 kB
blockdev.c 35 kB
blockdev.h 1.9 kB
blockjob.c 6.5 kB
blockjob.h 7.2 kB
bswap.h 13.9 kB
bt-host.c 5.2 kB
bt-host.h 123 Bytes
bt-vhci.c 4.5 kB
buffered_file.c 6.9 kB
buffered_file.h 916 Bytes
cache-utils.c 2.1 kB
cache-utils.h 1.2 kB
cmd.c 12.1 kB
cmd.h 2 kB
compatfd.c 2.8 kB
compatfd.h 1.5 kB
compiler.h 2 kB
config.h 52 Bytes
configure 105.6 kB
console.c 47.6 kB
console.h 12.2 kB
coroutine-gthread.c 5.8 kB
coroutine-sigaltstack.c 9.2 kB
coroutine-ucontext.c 6.4 kB
coroutine-win32.c 2.6 kB
cpu-all.h 15.6 kB
cpu-common.h 4.1 kB
cpu-defs.h 9.6 kB
cpu-exec.c 26.9 kB
cpus.c 33.1 kB
cpus.h 587 Bytes
cputlb.c 10.9 kB
cputlb.h 1.9 kB
cris-dis.c 79.8 kB
cursor.c 5.3 kB
cursor_hidden.xpm 1.3 kB
cursor_left_ptr.xpm 1.4 kB
cutils.c 10 kB
def-helper.h 8.5 kB
device_tree.c 7.5 kB
device_tree.h 2.5 kB
dis-asm.h 18.4 kB
disas.c 12.7 kB
disas.h 1.1 kB
dma-helpers.c 10.9 kB
dma.h 9.4 kB
dump-stub.c 1.5 kB
dump.c 22.1 kB
dump.h 1.2 kB
elf.h 47.3 kB
envlist.c 5.3 kB
envlist.h 484 Bytes
error.c 1.5 kB
error.h 1.7 kB
event_notifier.c 1.3 kB
event_notifier.h 807 Bytes
exec-all.h 12.5 kB
exec-memory.h 1 kB
exec-obsolete.h 4.2 kB
exec.c 122.3 kB
gdbstub.c 75.9 kB
gdbstub.h 1.5 kB
gen-icount.h 1.3 kB
hmp-commands.hx 40 kB
hmp.c 35.3 kB
hmp.h 3.2 kB
host-utils.c 2.8 kB
host-utils.h 5.5 kB
hppa-dis.c 100.2 kB
hppa.ld 7.8 kB
i386-dis.c 159.1 kB
i386.ld 4.6 kB
ia64-dis.c 396.7 kB
ia64.ld 8.2 kB
input.c 13.3 kB
int128.h 1.9 kB
iohandler.c 5.5 kB
ioport.c 13.2 kB
ioport.h 2.6 kB
iorange.h 705 Bytes
iov.c 6.2 kB
iov.h 3.5 kB
json-lexer.c 9.3 kB
json-lexer.h 993 Bytes
json-parser.c 16.4 kB
json-parser.h 514 Bytes
json-streamer.c 3.2 kB
json-streamer.h 984 Bytes
kvm-all.c 50.7 kB
kvm-stub.c 2.5 kB
kvm.h 8.4 kB
libfdt_env.h 1.1 kB
linux-aio.c 5.5 kB
lm32-dis.c 12.6 kB
m68k-dis.c 211.6 kB
m68k.ld 5.9 kB
main-loop.c 12.8 kB
main-loop.h 13.5 kB
memory.c 51.6 kB
memory.h 27.2 kB
memory_mapping-stub.c 615 Bytes
memory_mapping.c 7.1 kB
memory_mapping.h 1.8 kB
microblaze-dis.c 62.1 kB
migration-exec.c 2.7 kB
migration-fd.c 2.9 kB
migration-tcp.c 2.9 kB
migration-unix.c 4.4 kB
migration.c 15.2 kB
migration.h 3.2 kB
mips-dis.c 206.6 kB
mips.ld 8.2 kB
module.c 1.4 kB
module.h 1.1 kB
monitor.c 134.7 kB
monitor.h 2.9 kB
nbd.c 30.4 kB
nbd.h 3.3 kB
net.c 26.1 kB
net.h 6.5 kB
notify.c 916 Bytes
notify.h 853 Bytes
os-posix.c 8.4 kB
os-win32.c 4.4 kB
osdep.c 8.8 kB
osdep.h 4.1 kB
oslib-posix.c 6.5 kB
oslib-win32.c 3.8 kB
page_cache.c 5 kB
path.c 4.7 kB
pci-ids.txt 883 Bytes
pflib.c 6.7 kB
pflib.h 496 Bytes
poison.h 1.8 kB
posix-aio-compat.c 16.6 kB
ppc-dis.c 237 kB
ppc.ld 8.5 kB
ppc64.ld 7.8 kB
qapi-schema-guest.json 13.4 kB
qapi-schema-test.json 1.3 kB
qapi-schema.json 74.1 kB
qbool.c 1.2 kB
qbool.h 535 Bytes
qdict-test-data.txt 88.4 kB
qdict.c 10.5 kB
qdict.h 2.1 kB
qemu-aio.h 2.1 kB
qemu-barrier.h 1.8 kB
qemu-bridge-helper.c 10.4 kB
qemu-char.c 74.5 kB
qemu-char.h 7.3 kB
qemu-common.h 13 kB
qemu-config.c 23.5 kB
qemu-config.h 760 Bytes
qemu-coroutine-int.h 1.7 kB
qemu-coroutine-io.c 2.4 kB
qemu-coroutine-lock.c 4.4 kB
qemu-coroutine-sleep.c 897 Bytes
qemu-coroutine.c 1.6 kB
qemu-coroutine.h 5.6 kB
qemu-doc.texi 79.7 kB
qemu-error.c 4.4 kB
qemu-error.h 1.2 kB
qemu-file.h 7 kB
qemu-ga.c 24.7 kB
qemu-img-cmds.hx 1.9 kB
qemu-img.c 52.7 kB
qemu-img.texi 11.6 kB
qemu-io.c 46.1 kB
qemu-lock.h 1.6 kB
qemu-log.c 4.4 kB
qemu-log.h 3.2 kB
qemu-nbd.c 16.8 kB
qemu-nbd.texi 1.5 kB
qemu-objects.h 506 Bytes
qemu-option-internal.h 1.7 kB
qemu-option.c 28 kB
qemu-option.h 6.1 kB
qemu-options-wrapper.h 1 kB
qemu-options.h 1.4 kB
qemu-options.hx 102.8 kB
qemu-os-posix.h 1.8 kB
qemu-os-win32.h 3 kB
qemu-progress.c 4 kB
qemu-queue.h 19.5 kB
qemu-seccomp.c 4 kB
qemu-seccomp.h 520 Bytes
qemu-sockets.c 22.6 kB
qemu-tech.texi 22.9 kB
qemu-thread-posix.c 3.4 kB
qemu-thread-posix.h 233 Bytes
qemu-thread-win32.c 8.8 kB
qemu-thread-win32.h 455 Bytes
qemu-thread.h 1.4 kB
qemu-timer-common.c 2 kB
qemu-timer.c 18.7 kB
qemu-timer.h 8.2 kB
qemu-tls.h 1.9 kB
qemu-tool.c 2.2 kB
qemu-user.c 1.2 kB
qemu-x509.h 239 Bytes
qemu-xattr.h 606 Bytes
qemu.sasl 1.3 kB
qemu_socket.h 1.9 kB
qerror.c 3 kB
qerror.h 8.3 kB
qfloat.c 1.2 kB
qfloat.h 562 Bytes
qint.c 1.2 kB
qint.h 539 Bytes
qjson.c 7.3 kB
qjson.h 730 Bytes
qlist.c 3.2 kB
qlist.h 1.6 kB
qmp-commands.hx 63.2 kB
qmp.c 13.7 kB
qobject.h 2.8 kB
qstring.c 3.1 kB
qstring.h 884 Bytes
qtest.c 10.9 kB
qtest.h 776 Bytes
range.h 867 Bytes
readline.c 12.8 kB
readline.h 1.5 kB
rules.mak 3.5 kB
s390-dis.c 93.3 kB
s390.ld 6.9 kB
savevm.c 62.7 kB
sh4-dis.c 82.7 kB
softmmu-semi.h 2.1 kB
softmmu_defs.h 1.6 kB
softmmu_exec.h 3.2 kB
softmmu_header.h 5.5 kB
softmmu_template.h 12.7 kB
sparc-dis.c 171.7 kB
sparc.ld 4.6 kB
sparc64.ld 4.4 kB
spice-qemu-char.c 6.7 kB
sysemu.h 5.6 kB
targphys.h 541 Bytes
tcg-runtime.c 2.2 kB
tci-dis.c 1.8 kB
tci.c 34.7 kB
thunk.c 8.8 kB
thunk.h 4.9 kB
trace-events 65.6 kB
translate-all.c 4.2 kB
uboot_image.h 5.9 kB
uri.c 56.4 kB
uri.h 4.3 kB
user-exec.c 19.2 kB
version.rc 749 Bytes
vgafont.h 93.3 kB
vl.c 105.5 kB
vmstate.h 29.6 kB
x86_64.ld 6.4 kB
xen-all.c 36.3 kB
xen-mapcache.c 12 kB
xen-mapcache.h 1.4 kB
xen-stub.c 1.2 kB

Latest revisions

# Date Author Comment
2e679780 10/05/2012 03:58 pm Jim Meyering

libcacard/vcard_emul_nss: use pstrcpy in place of strncpy

Replace strncpy+NUL-terminate use with use of pstrcpy.
This requires linking with cutils.o (or else vssclient doesn't link),
so add that in the Makefile.

Acked-by: Alon Levy <>
Signed-off-by: Jim Meyering <>...

1044dc11 10/05/2012 03:58 pm Jim Meyering

lm32: avoid buffer overrun

Actually do what the comment says, using pstrcpy NUL-terminate:
strncpy does not always do that.

Signed-off-by: Jim Meyering <>
Signed-off-by: Anthony Liguori <>

3eadc68e 10/05/2012 03:58 pm Jim Meyering

os-posix: avoid buffer overrun

os_set_proc_name: Use pstrcpy, in place of strncpy and the
ineffectual preceding assignment: name[sizeof(name) - 1] = 0;

Signed-off-by: Jim Meyering <>
Signed-off-by: Anthony Liguori <>

ae215068 10/05/2012 03:58 pm Jim Meyering

ppc: avoid buffer overrun: use pstrcpy, not strncpy

A terminal NUL is required by caller's use of strchr.
It's better not to use strncpy at all, since there is no need
to zero out hundreds of trailing bytes for each iteration.

Signed-off-by: Jim Meyering <>...

900cfbca 10/05/2012 03:58 pm Jim Meyering

linux-user: remove two unchecked uses of strdup

Remove two uses of strdup (use g_path_get_basename instead),
and add a comment that this strncpy use is ok.

Reviewed-by: Peter Maydell <>
Signed-off-by: Jim Meyering <>...

5847d9e1 10/05/2012 03:58 pm Jim Meyering

ui/vnc: simplify and avoid strncpy

Don't bother with strncpy. There's no need for its zero-fill.
Use g_strndup in place of g_malloc+strncpy+NUL-terminate.

Reviewed-by: Peter Maydell <>
Signed-off-by: Jim Meyering <>...

e5fda038 10/05/2012 03:58 pm Jim Meyering

bt: replace fragile snprintf use and unwarranted strncpy

In bt_hci_name_req a failed snprintf could return len larger than
sizeof(params.name), which means the following memset call would
have a "length" value of (size_t)-1, -2, etc... Sounds scary.
But currently, one can deduce that there is no problem:...

9238c209 10/05/2012 03:58 pm Jim Meyering

virtio-9p: avoid unwarranted uses of strncpy

In all of these cases, the uses of strncpy were unnecessary, since
at each point of use we know that the NUL-terminated source bytes
fit in the destination buffer. Use memcpy in place of strncpy.

Acked-by: Aneesh Kumar K.V <>...

9d055d8a 10/05/2012 03:58 pm Jim Meyering

vscsi: avoid unwarranted strncpy

Don't use strncpy when the source string is known to fit
in the destination buffer. Use equivalent memcpy.
We could even use strcpy, here, but some static analyzers
warn about that, so don't add new uses.

Acked-by: David Gibson <>...

1ab516ed 10/05/2012 03:58 pm Jim Meyering

qemu-ga: prefer pstrcpy: consistently NUL-terminate ifreq.ifr_name

NUL-termination of the .ifr_name field is not required, but is fine
(and preferable to using strncpy and leaving the reader to wonder),
since the first thing the linux kernel does is to clear the last byte....

View all revisions | View revisions

Also available in: Atom