ispg-group / aiidalab-ispg

ATMOSPEC: ab initio UV/vis spectroscopy for everyone
MIT License
6 stars 4 forks source link

Guard against file truncation in CalcJobOutputFollower #223

Open danielhollas opened 8 months ago

danielhollas commented 8 months ago

We need to put a bounds check on this line:

https://github.com/ispg-group/aiidalab-ispg/blob/54081f89ff186793cae8a754fb1746ccf29c9979/aiidalab_ispg/app/qeapp/widgets.py#L320

Same bug is present in QeApp CC @unkcpz

unkcpz commented 8 months ago

So you are worried about the lines being too many? What is the change you proposed?

danielhollas commented 8 months ago

Yes, if the file got truncated somehow than the code I linked to will raise an out-of-bounds error. We need to add a check to prevent that.

I'll prepare a PR for my app and ask you for review.