A California law banning possession and sale of gun magazines holding more than 10 rounds was blocked by a federal judge who said the law was unconstitutional in a decision released on Friday.