diff options
| -rw-r--r-- | debian/changelog | 6 | ||||
| -rw-r--r-- | debian/patches/0105-artec_missing_home_environment.patch | 41 | ||||
| -rw-r--r-- | debian/patches/series | 1 | 
3 files changed, 46 insertions, 2 deletions
| diff --git a/debian/changelog b/debian/changelog index fa68a8e..2e61d1d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,13 @@ -sane-backends (1.0.24-12) UNRELEASED; urgency=medium +sane-backends (1.0.24-12) unstable; urgency=medium    * debian/sane-utils.postinst:      - Fix home directory move (Closes: #785709).    * debian/patches/0005-mk_reproducible_results.patch:      - Build sane.ps without comments containing date/time. +  * New debian/patches/0105-artec_missing_home_environment.patch: +    - Test the environment variable HOME before use (Closes: #786452). - -- Jörg Frings-Fürst <debian@jff-webhosting.net>  Thu, 21 May 2015 08:25:53 +0200 + -- Jörg Frings-Fürst <debian@jff-webhosting.net>  Thu, 21 May 2015 13:11:11 +0200  sane-backends (1.0.24-11) unstable; urgency=medium diff --git a/debian/patches/0105-artec_missing_home_environment.patch b/debian/patches/0105-artec_missing_home_environment.patch new file mode 100644 index 0000000..6602164 --- /dev/null +++ b/debian/patches/0105-artec_missing_home_environment.patch @@ -0,0 +1,41 @@ +Description: Test if  environment variable "HOME" exist +Author: Jörg Frings-Fürst <debian@jff-webhosting.net> +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786452 +Forwarded: https://alioth.debian.org/tracker/index.php?func=detail&aid=315071&group_id=30186&atid=410366 +Last-Update: 2015-05-22 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: trunk/backend/artec_eplus48u.c +=================================================================== +--- trunk.orig/backend/artec_eplus48u.c ++++ trunk/backend/artec_eplus48u.c +@@ -3580,6 +3580,14 @@ load_calibration_data (Artec48U_Scanner +  +   s->calibrated = SANE_FALSE; +   path[0] = 0; ++ ++  /* return SANE_STATUS_INVAL if HOME environment variable is not set */ ++  if (getenv ("HOME") == NULL) ++  { ++    XDBG ((1, "Environment variable HOME not set\n")); ++    return SANE_STATUS_INVAL; ++  } ++ +   if (strlen (getenv ("HOME")) < (PATH_MAX - 1)) +     strcat (path, getenv ("HOME")); +   else +@@ -3690,6 +3698,14 @@ save_calibration_data (Artec48U_Scanner +   mode_t mode = S_IRUSR | S_IWUSR; +  +   path[0] = 0; ++ ++  /* return SANE_STATUS_INVAL if HOME environment variable is not set */ ++  if (getenv ("HOME") == NULL) ++  { ++    XDBG ((1, "Environment variable HOME not set\n")); ++    return SANE_STATUS_INVAL; ++  } ++ +   if (strlen (getenv ("HOME")) < (PATH_MAX - 1)) +     strcat (path, getenv ("HOME")); +   else diff --git a/debian/patches/series b/debian/patches/series index c3b722b..893cb58 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ +0105-artec_missing_home_environment.patch  0005-mk_reproducible_results.patch  hp3900.patch  typo.patch | 
