]> granicus.if.org Git - graphviz/commitdiff
Fix potential null pointer dereferences in UniformStressSmoother_new
authorAlex Henrie <alexhenrie24@gmail.com>
Sun, 24 Jan 2021 20:17:41 +0000 (13:17 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 30 Jan 2021 21:14:28 +0000 (13:14 -0800)
lib/sfdpgen/uniform_stress.c

index 02bf9976657622eea35546b3e7be0da89bba454b..e8e072842aed49e82e417a85ef67dd065548291b 100644 (file)
@@ -51,9 +51,6 @@ UniformStressSmoother UniformStressSmoother_new(int dim, SparseMatrix A, real *x
   /* Lw and Lwd have diagonals */
   sm->Lw = SparseMatrix_new(m, m, A->nz + m, MATRIX_TYPE_REAL, FORMAT_CSR);
   sm->Lwd = SparseMatrix_new(m, m, A->nz + m, MATRIX_TYPE_REAL, FORMAT_CSR);
-  iw = sm->Lw->ia; jw = sm->Lw->ja;
-  id = sm->Lwd->ia; jd = sm->Lwd->ja;
-  w = (real*) sm->Lw->a; d = (real*) sm->Lwd->a;
 
   if (!(sm->Lw) || !(sm->Lwd)) {
     StressMajorizationSmoother_delete(sm);