singam-sanjay/nbds

Invalid length used in nstring compare

Opened this issue · 0 comments

What steps will reproduce the problem?
1. ns1 = "12";
2. ns2 = "123";
3. Call int ns_cmp (const nstring_t *ns1, const nstring_t *ns2);

What is the expected output? What do you see instead?
Expected response: -1
Instead: 0, due to bug in ns_cmp using ns1->len for the compare

What version of the product are you using? On what operating system?
nbds-0.4.3

Please provide any additional information below.

Original issue reported on code.google.com by jvb...@gmail.com on 3 Jan 2013 at 5:54