From kwrite-devel Mon Dec 10 11:31:33 2007 From: Thomas Friedrichsmeier Date: Mon, 10 Dec 2007 11:31:33 +0000 To: kwrite-devel Subject: Re: Protect against negative size Message-Id: <200712101231.39743.thomas.friedrichsmeier () ruhr-uni-bochum ! de> X-MARC-Message: https://marc.info/?l=kwrite-devel&m=119728616314677 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1495180550==" --===============1495180550== Content-Type: multipart/signed; boundary="nextPart2387932.m7XmfEZgZp"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart2387932.m7XmfEZgZp Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 09 December 2007, Vladimir Prus wrote: > Now, I don't know what's right solution for this problem. > On KDevelop side, I'm gonna make sure KateView is never 0 in height. > However, I'd like propose the following patch that merely adds > assert -- so that next time somebody runs into this problem, the > crash is more obvious. Ah, thanks for tracking this down. I ran into the same issue with one of th= e=20 kateparts in RKWard, but I had a workaround, and never investigated. Testin= g=20 shows it is indeed this same negative height issue. Would it be ok to simply add a qMax(1, ...) around the calculation of the n= ew=20 cache size, to make sure it is always at least 1? Regards Thomas --nextPart2387932.m7XmfEZgZp Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBHXSObEKRv+5DVNhgRAiaAAKCYda5UKn+2ilH0Wr7vHCDn/Ck/7gCfeZAR 3+spaVYSZM0GwMvHeciI90E= =Fgy1 -----END PGP SIGNATURE----- --nextPart2387932.m7XmfEZgZp-- --===============1495180550== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ KWrite-Devel mailing list KWrite-Devel@kde.org https://mail.kde.org/mailman/listinfo/kwrite-devel --===============1495180550==--