mirror of
https://github.com/bobbimanners/emailler.git
synced 2025-01-31 15:30:45 +00:00
FIX: more than 3 dots in a dotted quad would crash the hostname resolver
git-svn-id: http://svn.code.sf.net/p/netboot65/code@243 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
parent
7fc7bcfcc0
commit
d8908995c7
@ -8,7 +8,13 @@
|
|||||||
.bss
|
.bss
|
||||||
dotted_quad_value: .res 4 ;set to 32 bit ip address on a succesful call to parse_dotted_quad
|
dotted_quad_value: .res 4 ;set to 32 bit ip address on a succesful call to parse_dotted_quad
|
||||||
|
|
||||||
dotted_quad_ptr: .res 4
|
.data
|
||||||
|
|
||||||
|
;self modifying code
|
||||||
|
dotted_quad_ptr:
|
||||||
|
lda $FFFF
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
.code
|
.code
|
||||||
|
|
||||||
@ -23,12 +29,6 @@
|
|||||||
; (*) NB to assist with url parsing, a ':' or '/' can also terminate the string
|
; (*) NB to assist with url parsing, a ':' or '/' can also terminate the string
|
||||||
parse_dotted_quad:
|
parse_dotted_quad:
|
||||||
stax dotted_quad_ptr+1
|
stax dotted_quad_ptr+1
|
||||||
|
|
||||||
lda #$AD ; $AD='LDA immediate'
|
|
||||||
sta dotted_quad_ptr
|
|
||||||
|
|
||||||
lda #$60 ; $60='RTS
|
|
||||||
sta dotted_quad_ptr+3
|
|
||||||
ldx #0
|
ldx #0
|
||||||
txa
|
txa
|
||||||
sta dotted_quad_value
|
sta dotted_quad_value
|
||||||
@ -61,6 +61,8 @@ parse_dotted_quad:
|
|||||||
|
|
||||||
@got_dot:
|
@got_dot:
|
||||||
inx
|
inx
|
||||||
|
cpx #4
|
||||||
|
beq @error
|
||||||
lda #0
|
lda #0
|
||||||
sta dotted_quad_value,x
|
sta dotted_quad_value,x
|
||||||
jmp @each_byte
|
jmp @each_byte
|
||||||
|
Loading…
x
Reference in New Issue
Block a user