Skip to content

Commit b335d65

Browse files
KristofferCElOceanografo
authored andcommitted
prevent conj! into uninitialized memory (JuliaLang#40481)
1 parent ac8add6 commit b335d65

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

stdlib/LinearAlgebra/src/matmul.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ function copyto!(B::AbstractVecOrMat, ir_dest::UnitRange{Int}, jr_dest::UnitRang
683683
copyto!(B, ir_dest, jr_dest, M, ir_src, jr_src)
684684
else
685685
LinearAlgebra.copy_transpose!(B, ir_dest, jr_dest, M, jr_src, ir_src)
686-
tM == 'C' && conj!(B)
686+
tM == 'C' && conj!(@view B[ir_dest, jr_dest])
687687
end
688688
B
689689
end
@@ -693,7 +693,7 @@ function copy_transpose!(B::AbstractMatrix, ir_dest::UnitRange{Int}, jr_dest::Un
693693
LinearAlgebra.copy_transpose!(B, ir_dest, jr_dest, M, ir_src, jr_src)
694694
else
695695
copyto!(B, ir_dest, jr_dest, M, jr_src, ir_src)
696-
tM == 'C' && conj!(B)
696+
tM == 'C' && conj!(@view B[ir_dest, jr_dest])
697697
end
698698
B
699699
end

0 commit comments

Comments
 (0)