diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-07-26 19:48:55 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-07-26 19:54:45 +0100 |
commit | 08246013777e261333f6f972554bc02ae17bc60a (patch) | |
tree | 74132e5d2396db01afd546f164f4c4605a91f42e /dgit | |
parent | 78ec9b7b05edf606cd489b1f091a20446f7a335f (diff) |
rpush: Support empty files in protocol_read_bytes
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -273,7 +273,7 @@ sub protocol_send_file ($$) { sub protocol_read_bytes ($$) { my ($fh, $nbytes) = @_; - $nbytes =~ m/^[1-9]\d{0,5}$/ or badproto \*RO, "bad byte count"; + $nbytes =~ m/^[1-9]\d{0,5}$|^0$/ or badproto \*RO, "bad byte count"; my $d; my $got = read $fh, $d, $nbytes; $got==$nbytes or badproto_badread $fh, "data block"; |