diff --git a/gtests/net/packetdrill/run_packet.c b/gtests/net/packetdrill/run_packet.c
index 639940fb36c865b60bc466da7fe3e8cbc034ece6..5b4c9f2bf384bbc1e09623ed6e990564dd92ef0d 100644
--- a/gtests/net/packetdrill/run_packet.c
+++ b/gtests/net/packetdrill/run_packet.c
@@ -422,12 +422,13 @@ static int offset_sack_blocks(struct packet *packet,
 				return STATUS_ERR;
 			int i = 0;
 			for (i = 0; i < num_blocks; ++i) {
-				struct sack_block *block =
-				    option->data.sack.block + i;
-				block->left =
-				    htonl(ntohl(block->left) + ack_offset);
-				block->right =
-				    htonl(ntohl(block->right) + ack_offset);
+				u32 val;
+				val = ntohl(option->data.sack.block[i].left);
+				val += ack_offset;
+				option->data.sack.block[i].left = htonl(val);
+				val = ntohl(option->data.sack.block[i].right);
+				val += ack_offset;
+				option->data.sack.block[i].right = htonl(val);
 			}
 		}
 	}
diff --git a/gtests/net/packetdrill/tcp_options_to_string.c b/gtests/net/packetdrill/tcp_options_to_string.c
index 758675a5d299874fb5ee9c6d0b834e77e69dcb57..d022ec2cb53b86a6b3529ebdfed0ced224bd15e6 100644
--- a/gtests/net/packetdrill/tcp_options_to_string.c
+++ b/gtests/net/packetdrill/tcp_options_to_string.c
@@ -92,13 +92,11 @@ int tcp_options_to_string(struct packet *packet,
 				goto out;
 			int i = 0;
 			for (i = 0; i < num_blocks; ++i) {
-				const struct sack_block *block =
-				    option->data.sack.block + i;
 				if (i > 0)
 					fputc(' ', s);
 				fprintf(s, "%u:%u",
-					ntohl(block->left),
-					ntohl(block->right));
+					ntohl(option->data.sack.block[i].left),
+					ntohl(option->data.sack.block[i].right));
 			}
 			break;