[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#758673: seed: bogus path_max handling, breaks libpeas on hurd-i386

Source: seed
Version: 3.8.1-1
Severity: important
Tags: patch
User: debian-hurd@lists.debian.org
Usertags: hurd


The seed package has some code to cope with the absence of PATH_MAX
limitation, but it is bogus: it tests whether the value returned by
pathconf (absolute_path, _PC_PATH_MAX) is negative, but it does so by
putting it in a gsize, which is unsigned. The attached patch fixes it by
making it use a gssize.

This fixes one of the libpeas testsuite failures on hurd-i386 seen on:



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

Kernel: Linux 3.16.0 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

X-Favorit-Cartoon: Calvin and Hobbes
 -+- Mail header of Wim van Dorst -+-
--- ./libseed/seed-importer.c.orig	2014-08-19 20:59:29.000000000 +0000
+++ ./libseed/seed-importer.c	2014-08-19 20:59:31.000000000 +0000
@@ -661,7 +661,7 @@
   JSStringRef file_contents, file_name;
   gchar *contents, *walk, *file_path, *canonical, *absolute_path, *normalp;
   gchar *normalized_path;
-  gsize path_max;
+  gssize path_max;
   file_path = g_build_filename (dir, file, NULL);
   canonical = seed_importer_canonicalize_path (file_path);
--- ./modules/os/seed-os.c.orig	2014-08-19 21:05:57.000000000 +0000
+++ ./modules/os/seed-os.c	2014-08-19 21:05:58.000000000 +0000
@@ -67,7 +67,7 @@
   gchar *arg;
   gchar *resolved_path;
   gchar *ret;
-  gsize path_max;
+  gssize path_max;
   if (argument_count != 1)

Reply to: