[Oberon] Buffer usage in Oberon.Mail.ReadText(...).

peter at easthope.ca peter at easthope.ca
Tue Feb 12 21:09:06 CET 2019


MODULE Mail IN Oberon; (** portable *)	(* ejz,  *)
  ...
PROCEDURE ReadText(S: NetTools.Session; VAR R: Files.Rider);
  VAR
    buffer: ARRAY BufLen OF CHAR;
    ...
BEGIN
  ...
  IF len > (BufLen-2) THEN
    rlen := BufLen-2
  ELSE
    rlen := len
  END;
  NetSystem.ReadBytes(S.C, 0, rlen, buffer);

Appears that the last two bytes of buffer are reserved.  No 
obvious requirement in NetSystem.ReadBytes.  Why not this?

   IF len > (BufLen) THEN
    rlen := BufLen
  ELSE
    rlen := len
  END;
  NetSystem.ReadBytes(S.C, 0, rlen, buffer);
 
 Thanks,                 ... Lyall E.
 
-- 
Message composed and transmitted by software designed to avoid the 
complication and vulnerability of antivirus software.

123456789 123456789 123456789 123456789 123456789 123456789 123456789
Tel: +1 360 639 0202                                  +1 
http://easthope.ca/Peter.html              Bcc: peter at easthope. ca


More information about the Oberon mailing list