On Mon, 19 Sep 2011, Kevin Wolf wrote: > If src ends with a backslash, you read beyond the end of the string.
Right, sending an updated patch. > Wouldn't it make sense to have the unescape integrated in > qemu_rbd_next_tok? Or are there any places where you would want to call > it without doing a qemu_rbd_unescape() afterwards? The conf string makes two passes through rbd_next_tok(), once to grab the whole conf string, and again to pull out each item. We can't strip out escaping the first time through or else e.g. \: will turn into the : delimiter. I thought about adding a flag to enable/disable the escaping, but explicitly doing the unescape seemed cleaner. sage >