[Issue 10012] fcntl called without checking value