On Sun, Jun 21, 2009 at 08:56:07PM -0700, Ben Pfaff wrote:
> Jason Stover <[email protected]> writes:
> 
> > interaction.c and covariance-matrix.c are ready for further review.
> 
> I looked over interaction.c tonight.  I have a few comments, and
> then some proposed commits to resolve those comments.  First the
> comments themselves:
> 
> ----------------------------------------------------------------------
... 
>       * This code allocates space for a string value one piece at a
>           time, but it would be more efficient to allocate the full
>           correct length ahead of time and just copy in the data as
>           necessary.
> 
>       * The width argument passed to value_str_rw is not always
>           correct; for example, after a call to value_resize that
>           passes 'val_width + w' as the new width, 'val_width' is
>           passed to value_str_rw as the width.  This can cause a
>           segfault in the right circumstances.

I agree with this change in principle, and I think I did something like
this to begin with, but this change seems to have caused a segfault here:

      int val_width = var_get_width (interaction_get_variable (var));

val_width is 0, which is the immediate cause. From a brief glance at the
code in main, I don't see why this change would cause a segfault when
the original code doesn't. I'll look into it more closely later.



_______________________________________________
pspp-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/pspp-dev

Reply via email to