diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 9a5d6c5e3a550c13ce0e992b78ef7169c95db372..a0d414483fc3b1e400ccd3b54ee8752a62cd701d 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -18306,10 +18306,11 @@ static enum sip_get_dest_result get_destination(struct sip_pvt *p, struct sip_re
 
 	/* If this is a subscription we actually just need to see if a hint exists for the extension */
 	if (req->method == SIP_SUBSCRIBE) {
-		char hint[AST_MAX_EXTENSION];
 		int which = 0;
-		if (ast_get_hint(hint, sizeof(hint), NULL, 0, NULL, p->context, uri) ||
-		    (ast_get_hint(hint, sizeof(hint), NULL, 0, NULL, p->context, decoded_uri) && (which = 1))) {
+
+		if (ast_get_hint(NULL, 0, NULL, 0, NULL, p->context, uri)
+			|| (ast_get_hint(NULL, 0, NULL, 0, NULL, p->context, decoded_uri)
+				&& (which = 1))) {
 			if (!oreq) {
 				ast_string_field_set(p, exten, which ? decoded_uri : uri);
 			}
diff --git a/main/manager.c b/main/manager.c
index 00e8420c3097daad0d05e451493bf17b87ace7c2..b8dbb1a042598094a6e947153138e9cc027c1076 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -5646,8 +5646,9 @@ static int action_extensionstate(struct mansession *s, const struct message *m)
 {
 	const char *exten = astman_get_header(m, "Exten");
 	const char *context = astman_get_header(m, "Context");
-	char hint[256] = "";
+	char hint[256];
 	int status;
+
 	if (ast_strlen_zero(exten)) {
 		astman_send_error(s, m, "Extension not specified");
 		return 0;
@@ -5656,16 +5657,18 @@ static int action_extensionstate(struct mansession *s, const struct message *m)
 		context = "default";
 	}
 	status = ast_extension_state(NULL, context, exten);
-	ast_get_hint(hint, sizeof(hint) - 1, NULL, 0, NULL, context, exten);
+	hint[0] = '\0';
+	ast_get_hint(hint, sizeof(hint), NULL, 0, NULL, context, exten);
 	astman_start_ack(s, m);
-	astman_append(s,   "Message: Extension Status\r\n"
-			   "Exten: %s\r\n"
-			   "Context: %s\r\n"
-			   "Hint: %s\r\n"
-			   "Status: %d\r\n"
-		           "StatusText: %s\r\n\r\n",
-		      exten, context, hint, status,
-		      ast_extension_state2str(status));
+	astman_append(s, "Message: Extension Status\r\n"
+		"Exten: %s\r\n"
+		"Context: %s\r\n"
+		"Hint: %s\r\n"
+		"Status: %d\r\n"
+		"StatusText: %s\r\n"
+		"\r\n",
+		exten, context, hint, status,
+		ast_extension_state2str(status));
 	return 0;
 }
 
@@ -6951,6 +6954,7 @@ static int manager_state_cb(char *context, char *exten, struct ast_state_cb_info
 	/* Notify managers of change */
 	char hint[512];
 
+	hint[0] = '\0';
 	ast_get_hint(hint, sizeof(hint), NULL, 0, NULL, context, exten);
 
 	switch(info->reason) {
diff --git a/main/pbx.c b/main/pbx.c
index 5ac97aad4a146664570d316a44cf1236af86afb7..d648084d7b76de4152f3ed94ecab8bb563cf983a 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -3921,7 +3921,6 @@ static int ast_add_hint(struct ast_exten *e)
 			hint_new->last_presence_state = presence_state;
 			hint_new->last_presence_subtype = subtype;
 			hint_new->last_presence_message = message;
-			message = subtype = NULL;
 		}
 	}