mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-15 09:44:04 +00:00
Fix bug #452 in apcupsd
the code was using sizeof on an array function parameter...
This commit is contained in:
parent
260e7c8bd6
commit
30d09e2e67
@ -104,7 +104,7 @@ static int get_line(int sock, char line[], short linesize) {
|
|||||||
while (sz > linesize) {
|
while (sz > linesize) {
|
||||||
// this is just a hack (being lazy), this should not happen anyway
|
// this is just a hack (being lazy), this should not happen anyway
|
||||||
net_recv(sock, line, linesize);
|
net_recv(sock, line, linesize);
|
||||||
sz -= sizeof(line);
|
sz -= linesize;
|
||||||
}
|
}
|
||||||
if (!net_recv(sock, line, sz)) return 0;
|
if (!net_recv(sock, line, sz)) return 0;
|
||||||
line[sz] = 0;
|
line[sz] = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user