Fix parsing bug in linux get_total_system_memory().
commit690c7be2537dc30be2d1f4978af7df77c46c2782
authorNick Mathewson <nickm@torproject.org>
Wed, 3 Mar 2021 19:52:15 +0000 (3 14:52 -0500)
committerNick Mathewson <nickm@torproject.org>
Wed, 3 Mar 2021 19:52:15 +0000 (3 14:52 -0500)
tree1fd8e0ee410ae63932c3e515f16091dbbc6514c2
parent49ce31b2b6c0cfbcccb605ee58b612f73e2a228a
Fix parsing bug in linux get_total_system_memory().

Use find_str_at_start_of_line(), not strstr() here: we don't want
to match "MemTotal: " if it appears in the middle of a line.

Fixes #40315; bugfix on 0.2.5.4-alpha.
changes/bug40315 [new file with mode: 0644]
src/lib/meminfo/.may_include
src/lib/meminfo/meminfo.c