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

Bug#844038: ocamlnet: FTBFS on hurd-i386: PATH_MAX



On 14/11/2016 21:47, Samuel Thibault wrote:
The attached patch avoids using by by just reading the symlink
length, and adjusting the size in case the symlink length increased in
between through really bad concurrency luck.

Sorry, I should have really tested it, here is a fixed patch.

+  if (lstat(String_val(path), &sb) != -1) {
+    buflen = sb.st_size + 1;
+  }

Shouldn't the type be verified before setting buflen this way? What if someone calls netsys_readlinkat on a very big (non-symlink) file?


Cheers,

--
Stéphane


Reply to: