]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-file-readelf-fix.patch
- add missing files to python-rpm
[packages/rpm.git] / rpm-file-readelf-fix.patch
index 4c1f706eea0ad8564be53ae2449b85b00ab230b5..ff5d52b7438fcd45fbb83f13512dca335d34d1c5 100644 (file)
@@ -1,12 +1,13 @@
---- rpm-4.3/file/src/readelf.c.orig    2004-03-19 21:12:58.000000000 +0100
-+++ rpm-4.3/file/src/readelf.c 2004-03-19 22:31:34.199417626 +0100
+diff -ur rpm.org/file/src/readelf.c rpm/file/src/readelf.c
+--- rpm.org/file/src/readelf.c 2004-06-14 17:19:46.426166808 +0200
++++ rpm/file/src/readelf.c     2004-06-14 17:24:43.083068104 +0200
 @@ -136,6 +136,9 @@
                            getu32(fm, ph32.p_align) : 4) \
                         : (off_t) (ph64.p_align ?      \
                            getu64(fm, ph64.p_align) : 4)))
-+#define ph_filesz     (fm->cls == ELFCLASS32          \
-+                       ? getu32(fm, ph32.p_filesz)    \
-+                       : getu64(fm, ph64.p_filesz))
++#define ph_filesz     (fm->cls == ELFCLASS32            \
++                      ? getu32(fm, ph32.p_filesz)  \
++                      : getu64(fm, ph64.p_filesz))
  #define nh_size               (fm->cls == ELFCLASS32          \
                         ? sizeof nh32                  \
                         : sizeof nh64)
                if (bufsize == -1) {
                        error(EXIT_FAILURE, 0, ": " "read failed (%s).\n", strerror(errno));
                        /*@notreached@*/
-@@ -601,7 +604,8 @@
+@@ -290,7 +293,7 @@
+       noff = offset;
+       doff = ELF_ALIGN(offset + nh_namesz);
+-      if (offset + nh_namesz >= size) {
++      if (offset + nh_namesz > size) {
+               /*
+                * We're past the end of the buffer.
+                */
+@@ -298,7 +301,7 @@
+       }
+       offset = ELF_ALIGN(doff + nh_descsz);
+-      if (offset + nh_descsz >= size)
++      if (doff + nh_descsz > size)
+               return offset;
+       if (nh_namesz == 4 && strcmp((char *)&nbuf[noff], "GNU") == 0 &&
+@@ -601,7 +604,7 @@
                                error(EXIT_FAILURE, 0, "lseek failed (%s).\n", strerror(errno));
                                /*@notreached@*/
                        }
 -                      bufsize = read(fm->fd, nbuf, sizeof(nbuf));
-+                      bufsize = read(fm->fd, nbuf, 
-+                              ((ph_filesz < sizeof(nbuf)) ? ph_filesz : sizeof(nbuf)));
++                      bufsize = read(fm->fd, nbuf, ((ph_filesz < sizeof(nbuf)) ? ph_filesz : sizeof(nbuf)));
                        if (bufsize == -1) {
                                error(EXIT_FAILURE, 0, ": " "read failed (%s).\n",
                                    strerror(errno));
-@@ -614,7 +618,7 @@
+@@ -614,7 +617,7 @@
                                offset = donote(fm, nbuf, offset,
                                    (size_t)bufsize, ph_align);
                        }
This page took 0.025504 seconds and 4 git commands to generate.