Finding accounting hash by key, de-pointerizing accounting_id and adding...

... accounting ids dynamically
Indeed, so I guess it should be min of the buffer len and the uri len. We can use the actual buffer len (as long as we use strncpy, not memcpy), but then we'll pad the entire remainder of the buffer with zeros, which is unnecessary. Guess we should just find the actual length of the ID we are going to extract from the uri and allocate a buffer of that size + 1 (for zero). Cost of this function is irrelevant since it will run approximately never (once per unique ID).