Bug 899: Fix size handling in FTP directory listings
commitd18333075d0d47304102e32d9621159b1fe31df4
authorJonas Fonseca <fonseca@diku.dk>
Mon, 18 Dec 2006 17:50:47 +0000 (18 18:50 +0100)
committerJonas Fonseca <fonseca@diku.dk>
Mon, 18 Dec 2006 17:55:21 +0000 (18 18:55 +0100)
tree0ff8003ad05f1db0f517c3980ddeff2a7bce9ff5
parentfbe800e685edf8d377bc56ad2a88faf65451e9a4
Bug 899: Fix size handling in FTP directory listings

This fixes parse_ftp_number to use off_t instead of long to store its
(intermediate) result and return type. It also introduces an OFFT_MAX type
"limit" that is used for validating the size of the parsed number.

A test-case for was added in 37c9bf3f7515c22f6d9e6e553de834f60185cac9 to
test-ftp-parser and the patch has been confirmed to fix the test-case by
adamg and me.  This closes bug 899, which is a duplicate of debian bug
403139.
src/osdep/types.h
src/protocol/ftp/ftp.c
src/protocol/ftp/parse.c
src/protocol/ftp/parse.h