From 54bc60f196f7f2c700cb2f606db5756123b0a74c Mon Sep 17 00:00:00 2001
From: mmsqe <mavis@crypto.com>
Date: Mon, 6 Nov 2023 20:35:29 +0800
Subject: [PATCH] fix expect pointer error when unmarshalling misbehaviour file
 (#5020)

* fix expect pointer error when unmarshalling misbehaviour file

* Update CHANGELOG.md

---------

Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
(cherry picked from commit 6c628f6fc746f325d3d9d88f314d6a0b184d1581)

# Conflicts:
#	CHANGELOG.md
---
 CHANGELOG.md                            | 4 ++++
 modules/core/02-client/client/cli/tx.go | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 551a751db4e..7650594a939 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -91,7 +91,11 @@ Ref: https://keepachangelog.com/en/1.0.0/
 * (testing) [\#4630](https://github.com/cosmos/ibc-go/pull/4630) Update `testconfig` to use revision formatted chain IDs.
 * (core/04-channel) [\#4706](https://github.com/cosmos/ibc-go/pull/4706) Retrieve correct next send sequence for packets in unordered channels.
 * (core/02-client) [\#4746](https://github.com/cosmos/ibc-go/pull/4746) Register implementations against `govtypes.Content` interface.
+<<<<<<< HEAD
 * (apps/27-interchain-accounts) [\#4944](https://github.com/cosmos/ibc-go/pull/4944) Add missing proto interface registration.
+=======
+* (core/02-client) [\#5020](https://github.com/cosmos/ibc-go/pull/5020) Fix expect pointer error when unmarshalling misbehaviour file.
+>>>>>>> 6c628f6f (fix expect pointer error when unmarshalling misbehaviour file (#5020))
 
 ### Documentation
 
diff --git a/modules/core/02-client/client/cli/tx.go b/modules/core/02-client/client/cli/tx.go
index 46d46678742..19fd8b3f90b 100644
--- a/modules/core/02-client/client/cli/tx.go
+++ b/modules/core/02-client/client/cli/tx.go
@@ -161,7 +161,7 @@ func newSubmitMisbehaviourCmd() *cobra.Command {
 					return fmt.Errorf("neither JSON input nor path to .json file for misbehaviour were provided: %w", err)
 				}
 
-				if err := cdc.UnmarshalInterfaceJSON(contents, misbehaviour); err != nil {
+				if err := cdc.UnmarshalInterfaceJSON(contents, &misbehaviour); err != nil {
 					return fmt.Errorf("error unmarshalling misbehaviour file: %w", err)
 				}
 			}