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

Bug#480433: libc6.1: mkdtemp on ia64 can return xa non null pointer not pointing at the template



Package: libc6.1
Version: 2.7-10
Severity: normal

Affects IA64 only

Code like...
static char buf[20];
strcpy(buf, "/tmp/some_XXXXXX");
char * tmpname=mkdtemp(buf);

can return tmpname which is non null and for which *tmpname seg faults
because it is not a valid address i.e. it does not point at the buf.
The template will have been modified correctly to point at a unique name.
So a workaround is to add

if (!tmpname) tmpname=buf;

Bug affects latest version of f2c-20061008-1 on IA64
(to reproduce run with no arguments, call is in the set_temp_names
function)

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: ia64

Kernel: Linux 2.6.18-dsa-mckinley (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages libc6.1 depends on:
ii  libgcc1                       1:4.3.0-4  GCC support library

libc6.1 recommends no packages.

-- debconf information:
  glibc/upgrade: true
  glibc/restart-services:
  glibc/restart-failed:



Reply to: