aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/feeds
diff options
context:
space:
mode:
authorDaniel Kestrel <kestrel1974@t-online.de>2021-07-25 20:32:05 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2021-08-08 20:51:52 +0200
commit94efa1c61247830b2e1190933e665eb3adcc66d5 (patch)
tree06963b5f1ce28312a4522291932f9047153f51f2 /scripts/feeds
parentd9be07169eccab26c62c87c7ac18bdd22b18036e (diff)
downloadupstream-94efa1c61247830b2e1190933e665eb3adcc66d5.tar.gz
upstream-94efa1c61247830b2e1190933e665eb3adcc66d5.tar.bz2
upstream-94efa1c61247830b2e1190933e665eb3adcc66d5.zip
fritz-tools: fix returning wrong values due to strncmp usage
When having two keys that start with the same characters and the second key just has one character more nand_tffs_read and tffs_read return the wrong value for the longer key. This is due to the usage of strncmp in combination with the length of the shorter key which is usually first in the list before the longer key and when strncmp matches, the search is stopped. The problem only occurs when the length of the two keys is different, not if just the last character is different. The fix is to use strcmp and as such it will only return the value if the key (name) and the key to look for (namefilter) have the same value and length. A sample case returning wrong values is when keys macwlan and macwlan2 are defined and querying macwlan2 returns the value for macwlan. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de> (cherry picked from commit 12564c5b860f9849c9a2fb7026c2c11150b9a4fc)
Diffstat (limited to 'scripts/feeds')
0 files changed, 0 insertions, 0 deletions