[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#8896) scale() uninitialized j

ethanms@gmail.com wrote:
> Full_Name: Ethan Schorer
> Version: since 2.4
> OS: Linux
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (
> In libraries/liblutil/utils.c in the function scale() the code defines "int i,
> j;".
> Then, i gets set in a for loop, but j only gets set if prev->len > 1.

Wrong. j gets set if prev->len >= 1.

> And then, j is used even if it wasn't initialized. Isn't this a bug?


> Shouldn't j be set to 0 when defined? Or don't use it?

There is no bug here. Closing this ITS.

   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/