The invention relates to copolymers comprising dicarboxylic acid units modified by -SR, -CSNR2 and/or -CN-units and at least one other type of copolymer. A method for producing said copolymers by a polymer-analogous reaction and the use of said copolymers in the form of a corrosion inhibitor are also disclosed.