[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Buffer size limitation in insdel.c
From: |
Andreas Schwab |
Subject: |
Re: Buffer size limitation in insdel.c |
Date: |
Thu, 23 Sep 2010 15:12:40 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Lars Magne Ingebrigtsen <address@hidden> writes:
> dispnew.c:783: warning: conversion to 'int' from 'Lisp_Object' may alter its
> value
This is an obvious bug. A Lisp_Object value must never be treated as an
integer, and this will fail to compile with --enable-use-lisp-union-type
(which is a good idea to enable during development).
> dispnew.c:2178: warning: conversion to 'long unsigned int' from 'short int'
> may change the sign of the result
>
> size_t nbytes = from->used[TEXT_AREA] * sizeof (struct glyph);
This is only a problem if from->used[TEXT_AREA] can be negative, which
it can't. Might be worth to change to unsigned short.
Andreas.
--
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
- Re: Buffer size limitation in insdel.c, (continued)
- Re: Buffer size limitation in insdel.c, David Kastrup, 2010/09/22
- Re: Buffer size limitation in insdel.c, Stefan Monnier, 2010/09/22
- Re: Buffer size limitation in insdel.c, Richard Stallman, 2010/09/22
- Re: Buffer size limitation in insdel.c, Eli Zaretskii, 2010/09/23
- Re: Buffer size limitation in insdel.c, Lars Magne Ingebrigtsen, 2010/09/23
- Re: Buffer size limitation in insdel.c, Eli Zaretskii, 2010/09/23
- Re: Buffer size limitation in insdel.c, Lars Magne Ingebrigtsen, 2010/09/23
- Re: Buffer size limitation in insdel.c, Lars Magne Ingebrigtsen, 2010/09/23
- Re: Buffer size limitation in insdel.c,
Andreas Schwab <=
- Re: Buffer size limitation in insdel.c, Eli Zaretskii, 2010/09/23
- Re: Buffer size limitation in insdel.c, Lars Magne Ingebrigtsen, 2010/09/23
- Re: Buffer size limitation in insdel.c, Eli Zaretskii, 2010/09/23
- Re: Buffer size limitation in insdel.c, Lars Magne Ingebrigtsen, 2010/09/23
- Re: Buffer size limitation in insdel.c, Lars Magne Ingebrigtsen, 2010/09/23
- Re: Buffer size limitation in insdel.c, Eli Zaretskii, 2010/09/23
- Re: Buffer size limitation in insdel.c, Lars Magne Ingebrigtsen, 2010/09/23
- Re: Buffer size limitation in insdel.c, Lars Magne Ingebrigtsen, 2010/09/23
- Re: Buffer size limitation in insdel.c, Eli Zaretskii, 2010/09/23
- Re: Buffer size limitation in insdel.c, Lars Magne Ingebrigtsen, 2010/09/23