j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: wmb Date: 2007-08-06 03:02:44 +0200 (Mon, 06 Aug 2007) New Revision: 526
Modified: ofw/inet/dns.fth ofw/inetv6/dns.fth Log: Use of malformed dotted IP addresses could leave base set to decimal.
Modified: ofw/inet/dns.fth =================================================================== --- ofw/inet/dns.fth 2007-08-06 00:29:32 UTC (rev 525) +++ ofw/inet/dns.fth 2007-08-06 01:02:44 UTC (rev 526) @@ -233,13 +233,11 @@ : ?bad-ip ( flag -- ) abort" Bad host name or address" ; 4 buffer: ip-buf : $>ip ( adr len -- 'ip ) - push-decimal ip-buf 4 bounds do - [char] . left-parse-string $number ?bad-ip + [char] . left-parse-string push-decimal $number pop-base ?bad-ip dup d# 256 >= ?bad-ip i c! loop - pop-base 2drop ip-buf ;
Modified: ofw/inetv6/dns.fth =================================================================== --- ofw/inetv6/dns.fth 2007-08-06 00:29:32 UTC (rev 525) +++ ofw/inetv6/dns.fth 2007-08-06 01:02:44 UTC (rev 526) @@ -233,13 +233,11 @@ : ?bad-ip ( flag -- ) abort" Bad host name or address" ; 4 buffer: ip-buf : $>ip ( adr len -- 'ip ) - push-decimal ip-buf 4 bounds do - [char] . left-parse-string $number ?bad-ip + [char] . left-parse-string push-decimal $number pop-base ?bad-ip dup d# 256 >= ?bad-ip i c! loop - pop-base 2drop ip-buf ;