Commit bc575e95d15dae70490ad165950f56235fbfa779
1 parent
00766a4e
Fix some more warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6300 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
2 additions
and
2 deletions
qemu-sockets.c
... | ... | @@ -107,7 +107,7 @@ int inet_listen(const char *str, char *ostr, int olen, |
107 | 107 | /* parse address */ |
108 | 108 | if (str[0] == ':') { |
109 | 109 | /* no host given */ |
110 | - strcpy(addr,""); | |
110 | + addr[0] = '\0'; | |
111 | 111 | if (1 != sscanf(str,":%32[^,]%n",port,&pos)) { |
112 | 112 | fprintf(stderr, "%s: portonly parse error (%s)\n", |
113 | 113 | __FUNCTION__, str); | ... | ... |
vnc.c
... | ... | @@ -2546,7 +2546,7 @@ int vnc_display_open(DisplayState *ds, const char *display) |
2546 | 2546 | char *dpy; |
2547 | 2547 | dpy = qemu_malloc(256); |
2548 | 2548 | if (strncmp(display, "unix:", 5) == 0) { |
2549 | - strcpy(dpy, "unix:"); | |
2549 | + pstrcpy(dpy, 256, "unix:"); | |
2550 | 2550 | vs->lsock = unix_listen(display+5, dpy+5, 256-5); |
2551 | 2551 | } else { |
2552 | 2552 | vs->lsock = inet_listen(display, dpy, 256, SOCK_STREAM, 5900); | ... | ... |