Both of them are corrosive but both of them are not acids. One is an acid and the other one is a base. So when acids and bases come together they neutralise each other. That is why sodium chloride is not corrosive
Explanation
The reaction between an acid and
a base is known as neutralization
reaction. In this reaction, both acid and
base cancel each other’s effect.
Neutralisation reaction results in the
formation of salt and water. During this
reaction, energy in the form of heat is
evolved.
Acid + Base → Salt + Water + Heat
For example, when sodium hydroxide
(NaOH) is added to hydrochloric acid
(HCl), sodium chloride (NaCl) and water
(H2O) are obtained.