Ensure strncmp compare include null-terminate char 85/316085/2
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 13 Aug 2024 10:43:44 +0000 (19:43 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Wed, 14 Aug 2024 02:10:21 +0000 (11:10 +0900)
commit22ebf7f9055231518fd5e59b863802436c10b69f
tree4378a3cd5e2871ea92e6e74eee978217bf2f8a20
parent8161573c592342b02c3c5b916b3e20dff0308e62
Ensure strncmp compare include null-terminate char

If we use n-paramater of strncmp as strlen, it will check only
Prefix of string.

For example,
char a[] = "asdf";
char b[] = "as";

then, strncmp(a, b, strlen(b)) will return 0, even if a and b is not equal.

To avoid this kind of problem, let we ensurely check end of comparitor is
delim or not.

Change-Id: I34b10a014cb06721af2cc92df06892bfb20bf6f3
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali-toolkit/internal/text/controller/text-controller.cpp