mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-11-17 13:42:49 +00:00
Minor fixes
This commit is contained in:
parent
3a294df4da
commit
db5d7e027c
3 changed files with 4 additions and 3 deletions
|
|
@ -259,7 +259,7 @@ allocate_line_storage(Line *line, bool initialize) {
|
|||
if (initialize) {
|
||||
line->cpu_cells = PyMem_Calloc(line->xnum, sizeof(CPUCell));
|
||||
line->gpu_cells = PyMem_Calloc(line->xnum, sizeof(GPUCell));
|
||||
if (line->cpu_cells == NULL || line->gpu_cells) {
|
||||
if (line->cpu_cells == NULL || line->gpu_cells == NULL) {
|
||||
PyErr_NoMemory();
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ def parse_cmd(serialized_cmd: memoryview, encryption_key: EllipticCurveKey) -> d
|
|||
pubkey = pcmd.get('pubkey', '')
|
||||
if not pubkey:
|
||||
log_error('Ignoring encrypted rc command without a public key')
|
||||
return {}
|
||||
d = AES256GCMDecrypt(encryption_key.derive_secret(base64.b85decode(pubkey)), base64.b85decode(pcmd['iv']), base64.b85decode(pcmd['tag']))
|
||||
data = d.add_data_to_be_decrypted(base64.b85decode(pcmd['encrypted']), True)
|
||||
pcmd = json.loads(data)
|
||||
|
|
|
|||
|
|
@ -924,12 +924,12 @@ csi_parse_loop(PS *self, ParsedCSI *csi, const uint8_t *buf, size_t *pos, const
|
|||
return true;
|
||||
case ':':
|
||||
if (!commit_csi_param(self, csi)) return true;
|
||||
csi->is_sub_param[csi->num_params] = true;
|
||||
if (csi->num_params < MAX_CSI_PARAMS) csi->is_sub_param[csi->num_params] = true;
|
||||
break;
|
||||
case ';':
|
||||
if (!csi->num_digits) csi->num_digits++; // Empty means zero
|
||||
if (!commit_csi_param(self, csi)) return true;
|
||||
csi->is_sub_param[csi->num_params] = false;
|
||||
if (csi->num_params < MAX_CSI_PARAMS) csi->is_sub_param[csi->num_params] = false;
|
||||
break;
|
||||
case DIGIT:
|
||||
csi_add_digit(csi, ch);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue