• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/cbootimage/0001-bct_dump-don-t-crash-on-devices-without-RSA-support.patch
Misha KomarovskiyMisha Komarovskiy committed 24a4f8a5cd204 Jan 2017
Raw file
Source viewDiff to previous
 
1
From 64045f993c2cd8989838aeaad3d22107d96d5596 Mon Sep 17 00:00:00 2001
2
From: Stephen Warren <swarren@nvidia.com>
3
Date: Thu, 28 Jul 2016 11:37:45 -0600
4
Subject: [PATCH] bct_dump: don't crash on devices without RSA support
5
​
6
format_rsa_param() currently crashes on chips that don't implement
7
soc_config->get_value_size(); that is, on all chips before T124. Fix the
8
function not to crash. Better might be to avoid even dumping RSA
9
parameters on chips which don't support RSA, but that's a larger change
10
that needs much more work.
11
​
12
Fixes: 3c3b992a6814 ("Add support to dump rsa related fields for t210")
13
Cc: Jimmy Zhang <jimmzhang@nvidia.com>
14
Signed-off-by: Stephen Warren <swarren@nvidia.com>
15
Signed-off-by: Misha Komarovskiy <zombah@gmail.com>
16
---
17
 src/bct_dump.c | 8 ++++++--
18
 1 file changed, 6 insertions(+), 2 deletions(-)
19
​
20
diff --git a/src/bct_dump.c b/src/bct_dump.c
21
index 4f50fa2..b4ca9fc 100644
22
--- a/src/bct_dump.c
23
+++ b/src/bct_dump.c
24
@@ -133,10 +133,14 @@ static void format_rsa_param(parse_token id, char const * message, void * data)
25
 {
26
 #define MAX_BYTE_NUMBER_PER_LINE   16
27
    u_int8_t *rsa = (u_int8_t *)data;
28
-   int size = g_soc_config->get_value_size(id);
29
-   int byte_index;
30
+   int size, byte_index;
31
 
32
    printf("%s", message);
33
+
34
+   if (!g_soc_config->get_value_size)
35
+       return;
36
+
37
+   size = g_soc_config->get_value_size(id);
38
    for (byte_index = 0; byte_index < size; ++byte_index) {
39
        printf(" %02x", *rsa++);
40
 
41
-- 
42
2.1.4
43
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.