Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37519937
en ru br
Репозитории ALT
S:7.0.3-alt1
5.1: 4.13-alt7
4.1: 4.11-alt3
4.0: 4.8-alt4
3.0: 4.8-alt2
www.altlinux.org/Changes

Группа :: Издательство
Пакет: texinfo

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: texinfo-4.7-rh-alt-readfile.patch
Скачать


--- texinfo-4.7/util/install-info.c.orig	2004-12-30 16:36:59 +0300
+++ texinfo-4.7/util/install-info.c	2004-12-30 16:36:59 +0300
@@ -609,14 +609,12 @@
     char **compression_program)
 {
   char *real_name;
-  FILE *f;
   int pipe_p;
-  int filled = 0;
-  int data_size = 8192;
+  unsigned data_size = 8192, filled = 0;
   char *data = xmalloc (data_size);
 
   /* If they passed the space for the file name to return, use it.  */
-  f = open_possibly_compressed_file (filename, create_callback,
+  FILE *f = open_possibly_compressed_file (filename, create_callback,
                                      opened_filename ? opened_filename
                                                      : &real_name,
                                      compression_program, &pipe_p);
@@ -630,9 +628,9 @@
         break;
 
       filled += nread;
-      if (filled == data_size)
+      if (data_size - filled < 8192)
         {
-          data_size += 65536;
+          data_size <<= 1;
           data = xrealloc (data, data_size);
         }
     }
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin