[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: oops? read/write vs type of length parameter
From: |
Eli Zaretskii |
Subject: |
Re: oops? read/write vs type of length parameter |
Date: |
Fri, 15 Apr 2011 12:41:02 +0300 |
> Date: Fri, 15 Apr 2011 01:55:52 -0700
> From: Paul Eggert <address@hidden>
> Cc: Eli Zaretskii <address@hidden>, address@hidden, address@hidden
>
> Anyway, I changed all the size_ts to EMACS_INTs and committed the patch
> (which fixed other bugs as already mentioned) as bzr 103919.
The change you made in emacs_read makes it possible for it to read
less than it was requested to:
- while ((rtnval = read (fildes, buf, nbyte)) == -1
+ while ((rtnval = read (fildes, buf, min (nbyte, MAX_RW_COUNT))) == -1
&& (errno == EINTR))
QUIT;
return (rtnval);
}
I don't think it's a good idea to silently truncate the request and
rely on the callers to loop (although I think they all do for now).
So I think we need a loop in emacs_read like what we do in
emacs_write.
- Re: oops? read/write vs type of length parameter, (continued)
- Re: oops? read/write vs type of length parameter, Paul Eggert, 2011/04/13
- Re: oops? read/write vs type of length parameter, Eli Zaretskii, 2011/04/13
- Re: oops? read/write vs type of length parameter, Ted Zlatanov, 2011/04/13
- Re: oops? read/write vs type of length parameter, Ted Zlatanov, 2011/04/15
- Re: oops? read/write vs type of length parameter, Paul Eggert, 2011/04/15
- Re: oops? read/write vs type of length parameter, Ted Zlatanov, 2011/04/15
- Re: oops? read/write vs type of length parameter, Stefan Monnier, 2011/04/14
- Re: oops? read/write vs type of length parameter, Paul Eggert, 2011/04/15
- Re: oops? read/write vs type of length parameter,
Eli Zaretskii <=
- Re: oops? read/write vs type of length parameter, Paul Eggert, 2011/04/15
- Re: oops? read/write vs type of length parameter, Davis Herring, 2011/04/12
- Re: oops? read/write vs type of length parameter, Eli Zaretskii, 2011/04/12
- Re: oops? read/write vs type of length parameter, Paul Eggert, 2011/04/12