A method for adaptation of a mass flow sensor which is intended to measure a mass flow of air in an air intake to a combustion engine, characterised in that the method comprises the following steps: - fuel which is injected into the engine and/or into an exhaust line downstream of the engine but does not undergo combustion is caused to accompany the exhaust gases produced by the engine to a fuel oxidation device situated in the exhaust line, in order to be oxidised in the fuel oxidation device and thereby generate an increase in the temperature of the exhaust gases passing through the fuel oxidation device, - a temperature increase value (Δ T BDOC-ADOC) which represents the increase in the temperature of the exhaust gases during their passage through the fuel oxidation device is determined on the basis of measured values from a temperature sensor which is intended to detect the temperature of the exhaust gases upstream of the fuel oxidation device, and from another temperature sensor (14; 15) which is intended to detect the temperature of the exhaust gases downstream of the fuel oxidation device, - a calculation value ( ṁ air 1) representing the prevailing mass flow of air in the engine's air intake is determined on the basis of said temperature increase value (Δ T BDOC-ADOC), a first fuel mass flow value ( ṁ fuel 1) representing the mass flow of said injected fuel which, having undergone no combustion, accompanies the exhaust gases, and a second fuel mass flow value ( ṁ fuel 2) representing the mass flow of fuel injected into and burnt in the engine, - said calculation value ( ṁ air 1) is compared with a corresponding measured value ( ṁ air 2) determined by means of the mass flow sensor, and - the mass flow sensor is adapted on the basis of the result of that comparison. - fuel which is injected into the engine and/or into an exhaust line downstream of the engine but does not undergo combustion is caused to accompany the exhaust gases produced by the engine to a fuel oxidation device situated in the exhaust line, in order to be oxidised in the fuel oxidation device and thereby generate an increase in the temperature of the exhaust gases passing through the fuel oxidation device, - a temperature increase value (Δ T BDOC-ADOC) which represents the increase in the temperature of the exhaust gases during their passage through the fuel oxidation device is determined on the basis of measured values from a temperature sensor which is intended to detect the temperature of the exhaust gases upstream of the fuel oxidation device, and from another temperature sensor (14; 15) which is intended to detect the temperature of the exhaust gases downstream of the fuel oxidation device, - a calculation value ( ṁ air 1) representing the prevailing mass flow of air in the engine's air intake is determined on the basis of said temperature increase value (Δ T BDOC-ADOC), a first fuel mass flow value ( ṁ fuel 1) representing the mass flow of said injected fuel which, having undergone no combustion, accompanies the exhaust gases, and a second fuel mass flow value ( ṁ fuel 2) representing the mass flow of fuel injected into and burnt in the engine, - said calculation value ( ṁ air 1) is compared with a corresponding measured value ( ṁ air 2) determined by means of the mass flow sensor, and - the mass flow sensor is adapted on the basis of the result of that comparison.