Your message dated Wed, 04 Jan 2017 19:48:24 +0000
with message-id <[email protected]>
and subject line Bug#838133: fixed in flex 2.6.1-1.3
has caused the Debian Bug report #838133,
regarding flex: FTBFS on hurd-i386
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
838133: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838133
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: flex
Version: 2.6.1-1
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd

Hello,

flex currently FTBFS on hurd-i386 because it unconditionnally uses
PATH_MAX. The attached patch makes it just dynamically allocate the
proper buffer size.

Actually flax even bogusly used PATH_MAX, since it checked for "path"
being not too long, but didn't take into account the additional length
of "m4", so the proposed patch is actually a bugfix on !hurd too: if
PATH contains a path with more than PATH_MAX characters, the additional
"m4" two bytes were overflowing the m4_path array.

Samuel

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 
'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 
'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.7.0 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages flex depends on:
ii  cdebconf [debconf-2.0]  0.215
ii  debconf [debconf-2.0]   1.5.59
ii  dpkg                    1.18.10
ii  install-info            6.3.0.dfsg.1-1
ii  libc6                   2.23-5
ii  libfl-dev               2.6.1-1
ii  m4                      1.4.17-5

Versions of packages flex recommends:
ii  clang-3.5 [c-compiler]  1:3.5.2-3
ii  clang-3.6 [c-compiler]  1:3.6.2-3
ii  gcc [c-compiler]        4:6.1.1-1
ii  gcc-5 [c-compiler]      5.4.1-1
ii  gcc-6 [c-compiler]      6.1.1-11

Versions of packages flex suggests:
ii  bison            2:3.0.4.dfsg-1
ii  build-essential  12.2

-- no debconf information

-- 
Samuel
"I don't know why, but first C programs tend to look a lot worse than
first programs in any other language (maybe except for fortran, but then
I suspect all fortran programs look like `firsts')"
(By Olaf Kirch)
--- src/main.c.original 2016-09-17 15:05:32.000000000 +0000
+++ src/main.c  2016-09-17 15:13:47.000000000 +0000
@@ -358,8 +358,8 @@
                        if (!path) {
                                m4 = M4;
                        } else {
+                               int m4_length = strlen(m4);
                                do {
-                                       char m4_path[PATH_MAX];
                                        int length = strlen(path);
                                        struct stat sbuf;
 
@@ -367,19 +367,17 @@
                                        if (!endOfDir)
                                                endOfDir = path+length;
 
-                                       if ((endOfDir-path+2) >= 
sizeof(m4_path)) {
-                                           path = endOfDir+1;
-                                               continue;
-                                       }
+                                       {
+                                               char m4_path[endOfDir-path + 1 
+ m4_length + 1];
 
-                                       strncpy(m4_path, path, sizeof(m4_path));
-                                       m4_path[endOfDir-path] = '/';
-                                       m4_path[endOfDir-path+1] = '\0';
-                                       strncat(m4_path, m4, sizeof(m4_path));
-                                       if (stat(m4_path, &sbuf) == 0 &&
-                                               (S_ISREG(sbuf.st_mode)) && 
sbuf.st_mode & S_IXUSR) {
-                                               m4 = strdup(m4_path);
-                                               break;
+                                               memcpy(m4_path, path, 
endOfDir-path);
+                                               m4_path[endOfDir-path] = '/';
+                                               memcpy(m4_path + 
(endOfDir-path) + 1, m4, m4_length + 1);
+                                               if (stat(m4_path, &sbuf) == 0 &&
+                                                       (S_ISREG(sbuf.st_mode)) 
&& sbuf.st_mode & S_IXUSR) {
+                                                       m4 = strdup(m4_path);
+                                                       break;
+                                               }
                                        }
                                        path = endOfDir+1;
                                } while (path[0]);

--- End Message ---
--- Begin Message ---
Source: flex
Source-Version: 2.6.1-1.3

We believe that the bug you reported is fixed in the latest version of
flex, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Christoph Berg <[email protected]> (supplier of updated flex package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 04 Jan 2017 19:53:51 +0100
Source: flex
Binary: flex flex-doc libfl-dev
Architecture: source
Version: 2.6.1-1.3
Distribution: unstable
Urgency: medium
Maintainer: Manoj Srivastava <[email protected]>
Changed-By: Christoph Berg <[email protected]>
Description:
 flex       - fast lexical analyzer generator
 flex-doc   - Documentation for flex (a fast lexical analyzer generator)
 libfl-dev  - static library for flex (a fast lexical analyzer generator)
Closes: 838133
Changes:
 flex (2.6.1-1.3) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * Fix FTBFS on hurd (upstream 7975c43384d766ca12cb3f292754dbdc34168886).
     (Closes: 838133).
Checksums-Sha1:
 b37cd6b4baa3a2268c270c230b205454751005f5 2100 flex_2.6.1-1.3.dsc
 08effe91d14282baae81950e1022627f753ca96c 34467 flex_2.6.1-1.3.diff.gz
Checksums-Sha256:
 da63c4bb4d0a5a1ed20645c9f2266ae235caee115e26e946d992175b4ee7d82a 2100 
flex_2.6.1-1.3.dsc
 8c7396e703eff8d3c8be6d718dde025c55f7a101ed2231a62b93d1225aaf6571 34467 
flex_2.6.1-1.3.diff.gz
Files:
 9aad2a53396bd2519e0f508bed85c1f0 2100 devel optional flex_2.6.1-1.3.dsc
 d560f61626d929be3605d52af87248e3 34467 devel optional flex_2.6.1-1.3.diff.gz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEXEj+YVf0kXlZcIfGTFprqxLSp64FAlhtTBQACgkQTFprqxLS
p65tpA//SK/XeVKnGL9pHWq5xOvh7/rTcKr12duQ9+LC6xLdecGtq8Ip5bFWYZMw
pfkpKea9L/pBl+WoWUhAuqBLLhm3rKC8Z6nXwhuGHDYruQbrJ8S6COjLSOLS+bhj
pLcMHB0YslzrZdGoXHJ38kgD+S3PYr6NFJdFSqpSCdt+AOchO17pFa2S/qwpnnnk
AKS/7C9fRM+qDkrcHm/7tlwLQXOcBPRnhaaxZPRas0IclaUpQvkHjJ83Mk3A31D2
9q9Zm0pAjRuyJntpuke2wZQyHlIndeISzRcvFhW5mbtJBZ6Mn48UpGSIglhAAqEj
EWKuu1kelubuHZUwR4EEnOTk84L1DPK1aXQ3VZKG+PVt+RJCE56rggLA3kX8by7X
NAqK8c0Dmozsf0VTjLl84FOlbxlTtwcgNzeDQiwGEB1CUmbiJqVQs8G/plAGxvJz
zprlcowlXBwFZxWVN/v1q+Uabxhm454zq06srC3dLRJjYYcNScLSRxRRDbcxs8bv
nGN6P/gc5g08gkGaMoDJcaMo+IHxeWKcTnnB3UThJnQM2/a/+pEaKfKQB7Jk9DOw
O2q+yw7P8AoLyPXkBm/yjWngjQWvl3oUMevyk66k9MWW8HBjcJ9R+GWPY1rfI7W4
FLqaSMGikzQWi++CRBJbR7E8MMqkm5rhBJurZ329vJsWV3cfCWM=
=ZEf5
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to