HP has recalled more than half a million digital cameras, citing the risk of a fire from an overheated battery.

HP learned of the problem when a customer complained that his Photosmart R707 digital camera had caught fire while plugged into its docking station, according to a press release issued on Tuesday by the US Consumer Product Safety Commission.

The flames damaged the camera and filled the room with smoke, but the customer was not injured.

The problem is caused by a mistake in the camera's firmware that kicks in when the device is plugged into an AC adaptor or docking station, and attempts to charge non-rechargeable batteries such as the Duracell CP-1, HP said.

HP has issued a downloadable repair patch for customers.

The recall affects 679,000 cameras worldwide. HP sold the 5.1-megapixel camera from August 2004 until April 2006.

The company has since launched several new generations of digital camera.