Menu

#323 rawsock :end vs. :size confusion -> wrong buffer size

segfault
closed-fixed
modules (18)
5
2006-06-21
2006-02-07
No

Unless I'm mistaken:
rawsock.c:parse_buffer_arg: I believe there's confusion
about size and :end

*size = missingp(STACK_0) ? vector_length(*arg_)
: posfixnum_to_V(check_posfixnum(STACK_0));
data = array_displace_check(*arg_,*size,&start);
{ void *start_address =
(void*)(TheSbvector(data)->data + start);

handle_fault_range(prot,(aint)start_address,(aint)start_address
+ *size);

:start 1000 :end 1002 should yield I/O size 2, not 1002

Furthermore, :end >(length buf) probably yields
misleading error messages.

Possibly needs the test_vector_limits() abstraction
Maybe that function should be made available for use by
external modules?

Work-around: do not use :start/:end for now.

Regards,
Jörg Höhle

Discussion

  • Jörg Höhle

    Jörg Höhle - 2006-04-18
    • assigned_to: haible --> nobody
     
  • Sam Steingold

    Sam Steingold - 2006-06-21

    Logged In: YES
    user_id=5735

    thank you for your bug report.
    the bug has been fixed in the CVS tree.
    you can either wait for the next release (recommended)
    or check out the current CVS tree (see http://clisp.cons.org\)
    and build CLISP from the sources (be advised that between
    releases the CVS tree is very unstable and may not even build
    on your platform).

     
  • Sam Steingold

    Sam Steingold - 2006-06-21
    • assigned_to: nobody --> sds
    • summary: rawsock :end vs. size confusion -> wrong buffer size --> rawsock :end vs. :size confusion -> wrong buffer size
    • status: open --> closed-fixed
     

Log in to post a comment.