mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-10 01:18:01 +03:00
fix bug in vmtar
Incompatiple types (size_t/ssize_t) can make vmtar to ignore errors. We now compile with -Werror and -Wtype-limits to detect such things.
This commit is contained in:
parent
3da8510790
commit
c811a3c606
6
Makefile
6
Makefile
@ -2,7 +2,7 @@ RELEASE=2.2
|
||||
|
||||
VERSION=2.0
|
||||
PACKAGE=qemu-server
|
||||
PKGREL=62
|
||||
PKGREL=63
|
||||
|
||||
DESTDIR=
|
||||
PREFIX=/usr
|
||||
@ -35,10 +35,10 @@ vzsyscalls.ph: vzsyscalls.h
|
||||
h2ph -d . vzsyscalls.h
|
||||
|
||||
vmtar: vmtar.c utils.c
|
||||
gcc -O2 -Wall -o vmtar vmtar.c
|
||||
gcc -O2 -Werror -Wall -Wtype-limits -o vmtar vmtar.c
|
||||
|
||||
sparsecp: sparsecp.c utils.c
|
||||
gcc -O2 -Wall -o sparsecp sparsecp.c
|
||||
gcc -O2 -Werror -Wall -Wtype-limits -o sparsecp sparsecp.c
|
||||
|
||||
%.1.gz: %.1.pod
|
||||
rm -f $@
|
||||
|
@ -1,3 +1,9 @@
|
||||
qemu-server (2.0-63) unstable; urgency=low
|
||||
|
||||
* fix bug in vmtar
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 25 Oct 2012 10:00:50 +0200
|
||||
|
||||
qemu-server (2.0-62) unstable; urgency=low
|
||||
|
||||
* vncproxy: wait until vnc port is ready
|
||||
|
4
utils.c
4
utils.c
@ -68,7 +68,7 @@ safe_read(int fd, char *buf, size_t count)
|
||||
int
|
||||
full_read(int fd, char *buf, size_t len)
|
||||
{
|
||||
size_t n;
|
||||
ssize_t n;
|
||||
size_t total;
|
||||
|
||||
total = 0;
|
||||
@ -110,7 +110,7 @@ safe_write(int fd, char *buf, size_t count)
|
||||
int
|
||||
full_write(int fd, char *buf, size_t len)
|
||||
{
|
||||
size_t n;
|
||||
ssize_t n;
|
||||
size_t total;
|
||||
|
||||
total = 0;
|
||||
|
2
vmtar.c
2
vmtar.c
@ -402,7 +402,7 @@ dump_sparse_file (int fd, struct writebuffer *wbuf, struct sp_array *ma)
|
||||
|
||||
while (bytes_left > 0) {
|
||||
size_t bufsize = (bytes_left > BLOCKSIZE) ? BLOCKSIZE : bytes_left;
|
||||
size_t bytes_read;
|
||||
ssize_t bytes_read;
|
||||
|
||||
char *blkbuf = buffer_block (wbuf);
|
||||
if ((bytes_read = full_read (fd, blkbuf, bufsize)) < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user