Software Package:       
	texinfo

Release/Version:
	Version 2.10-p1.

Retrieved from:
	ftp.gnu.ai.mit.edu

Bug reports:
	This software package is maintained by the software contributor,
	not BSDI.  Please send any bug reports to both support@BSDI.COM
	and bug-texinfo@prep.ai.mit.edu.

Comments:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Modifications to this version made by BSDI:

date: 1995/11/24 02:35:23;  author: torek;  state: Exp;  lines: +9 -5
The st_size field of a stat structure is **NOT** suitable for blindly
passing to functions expecting "int"!
===================================================================
RCS file: /master/contrib/texinfo/makeinfo/makeinfo.c,v
retrieving revision 1.2
diff -c -2 -r1.2 makeinfo.c
*** 1.2	1995/03/27 01:03:59
--- makeinfo.c	1995/11/24 02:21:59
***************
*** 1032,1035 ****
--- 1032,1036 ----
    struct stat fileinfo;
    int file = -1, n, i, count = 0;
+   int filesize;
    char *fullpath, *result, *get_file_info_in_path ();
  
***************
*** 1048,1052 ****
  
    /* Load the file. */
!   result = (char *)xmalloc (1 + fileinfo.st_size);
  
    /* VMS stat lies about the st_size value.  The actual number of
--- 1049,1054 ----
  
    /* Load the file. */
!   filesize = fileinfo.st_size;	/* truncate size to int; lose on big files */
!   result = (char *)xmalloc (1 + filesize);
  
    /* VMS stat lies about the st_size value.  The actual number of
***************
*** 1055,1064 ****
      suffices to make things work. */
  #if defined (VMS)
!   while ((n = read (file, result + count, fileinfo.st_size)) > 0)
      count += n;
    if (n == -1)
  #else /* !VMS */
!     count = fileinfo.st_size;
!     if (read (file, result, fileinfo.st_size) != fileinfo.st_size)
  #endif /* !VMS */
    error_exit:
--- 1057,1066 ----
      suffices to make things work. */
  #if defined (VMS)
!   while ((n = read (file, result + count, filesize)) > 0)
      count += n;
    if (n == -1)
  #else /* !VMS */
!     count = filesize;
!     if (read (file, result, filesize) != filesize)
  #endif /* !VMS */
    error_exit:
***************
*** 4546,4549 ****
--- 4548,4552 ----
  	    char last_char = the_file[i];
  
+ 	    /* XXX if fileinfo.st_size > INT_MAX, this loop is broken */
  	    while (i < fileinfo.st_size)
  	      {
***************
*** 4572,4575 ****
--- 4575,4579 ----
  		char last_char = the_file[i];
  
+ 		/* XXX if fileinfo.st_size > INT_MAX, this loop is broken */
  		while (i < fileinfo.st_size)
  		  {
