Hi,

>From the code:
memcached_return_t rc= memcached_response(server, mech, sizeof(mech), NULL);
  if (memcached_failed(rc))

memcached_response() adds NULL to strings if memcached_response() successful, 
otherwise the code follows the error path. The author of this report mentions:
libmemcached/response.cc:619
which is:
          if ((rc= memcached_safe_read(instance, buffer, bodylen)) != 
MEMCACHED_SUCCESS)
          {
            return MEMCACHED_UNKNOWN_READ_FAILURE;
          }

As you can see, an error is returned back to memcached_sasl as mentioned
in the original report.

All that you will achieve with calling memset() in this manner is hide
any real bug that valgrind would find.

The reason why "This bug is difficult to reproduce since it depends on
the contents of the stack.", is because there is no bug in the reporters
work.

I cannot find a case of this bug being reported upstream, otherwise I
would close it there with above message.

Thanks,

   -- Brian

FWIW I appreciate people going to the effort of reporting bugs, it takes
time to write them up.

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

Title:
  Missing null termination in PROTOCOL_BINARY_CMD_SASL_LIST_MECHS
  response handling

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to