Opened 12 years ago

Closed 12 years ago

#249 closed defect (fixed)

bug in ccl::decode-string-from-octets

Reported by: gb Owned by: gb
Priority: major Milestone:
Component: Runtime (threads, GC) Version:
Keywords: Cc:

Description

Reported in email:

I know this is an internal function, but I don't see any exported equivalent
functionality.  In any case, it appears the :start keyword argument is doing
something wrong.

Welcome to Clozure Common Lisp Version 1.2-r7902S  (LinuxX8664)!
? (ccl::decode-string-from-octets  (make-array 5 :element-type
'(unsigned-byte 8) :initial-element 65))
"AAAAA"
5
? (ccl::decode-string-from-octets  (make-array 5 :element-type
'(unsigned-byte 8) :initial-element 65) :start 1)
"AA"
3
? (ccl::decode-string-from-octets  (make-array 5 :element-type
'(unsigned-byte 8) :initial-element 65) :start 0)
"AAAAA"
5
? (ccl::decode-string-from-octets  (make-array 5 :element-type
'(unsigned-byte 8) :initial-element 65) :start 2)
""
1
? (ccl::decode-string-from-octets  (make-array 5 :element-type
'(unsigned-byte 8) :initial-element 65) :start 1)
"AA"
3


In this case it's skipping some extra octets.  But that's not the worst of
it.  "In the wild" I observed this function adding garbage to the end of the
string that is returned, if start > 0.

Change History (2)

comment:1 Changed 12 years ago by gb

  • Status changed from new to assigned

comment:2 Changed 12 years ago by gb

  • Resolution set to fixed
  • Status changed from assigned to closed

Should be fixed in changeset:8572

Note: See TracTickets for help on using tickets.