]> git.lyx.org Git - features.git/commit
Experiment: limit size of strings read from lib/symbols
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 10 Mar 2017 15:29:09 +0000 (16:29 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 10 Mar 2017 15:29:09 +0000 (16:29 +0100)
commit9a013637bbe7c35dc90cb28ff874da99133a1f8b
treec93a8aa80ca2d9b49900c434f2e48b4d83ddc44f
parent0f220503ff9f0b571ce3d3f8ee5941cf344edff7
Experiment: limit size of strings read from lib/symbols

Coverity complains that we might read strings that are arbitrary
large, and that this can be a security issue. This is a problem in
particular, when we feed these strings to from_utf8(), which coverity
flags as dangerous for some reason.

The best solution would be IMO to model from_utf8() properly, but I do
not know how to do that. Here I try a different solution, where I
cannot read a string larger than 64k from the file.

Let's see whether this removes part of coverity warnings.
src/mathed/MathFactory.cpp