www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3794] New: Phobos' socket.receive should assert on the length of the target array

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3794

           Summary: Phobos' socket.receive should assert on the length of
                    the target array
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: default_357-line yahoo.de



---
A common mistake seems to be passing an empty array to .receive, in the
assumption that it will be resized. It would be better to assert on the array
length before passing it to the C socket function.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 11 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3794


Vladimir Panteleev <thecybershadow gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow gmail.com



19:09:04 PDT ---
It's probably too late to change this now. WONTFIX?

Also, it would probably have to be an enforce, not an assert.

By the way, the function already special-cased 0-length arrays, by always
returning 0 instead of passing it to the C socket function.

 A common mistake
Citation needed ;) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 23 2011