[Bug 796611] Re: nfs-utils: kernel version handling leads to segv on short versions (x.y)

Andy Whitcroft apw at canonical.com
Tue Jun 14 15:10:34 UTC 2011


** Changed in: nfs-utils (Ubuntu Oneiric)
       Status: Incomplete => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to nfs-utils in Ubuntu.
https://bugs.launchpad.net/bugs/796611

Title:
  nfs-utils: kernel version handling leads to segv on short versions
  (x.y)

Status in “linux” package in Ubuntu:
  Triaged
Status in “nfs-utils” package in Ubuntu:
  In Progress
Status in “linux” source package in Oneiric:
  Triaged
Status in “nfs-utils” source package in Oneiric:
  In Progress

Bug description:
  for example version "3.0" break mount.nfs, because this code catch
  segfault on "3.0"

  static inline unsigned int linux_version_code(void)
  {
  	struct utsname my_utsname;
  	unsigned int p, q, r;

  	if (uname(&my_utsname))
  		return 0;

  	p = atoi(strtok(my_utsname.release, "."));
  	q = atoi(strtok(NULL, "."));
  	r = atoi(strtok(NULL, "."));
  	return MAKE_VERSION(p, q, r);
  }

  and this is very common hack, linux version always starts with three
  numbers.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/796611/+subscriptions




More information about the foundations-bugs mailing list