)]}'
{
  "commit": "3cb73f9a98c41bfa3efa074765c3d22d3c2d98e9",
  "tree": "100625a9a6142c7975b1771885d55cebeef71d0b",
  "parents": [
    "8e0b14a98975d5762117f4d145443ac4df0b0396"
  ],
  "author": {
    "name": "Simon Marchi",
    "email": "simon.marchi@efficios.com",
    "time": "Mon Aug 17 11:16:06 2026 -0400"
  },
  "committer": {
    "name": "Simon Marchi",
    "email": "simon.marchi@efficios.com",
    "time": "Tue Aug 18 13:36:35 2026 -0400"
  },
  "message": "gdbsupport: remove uses of vsprintf\n\nWhen building on macOS, I get:\n\n      CXX      common-utils.o\n    /Users/smarchi/src/binutils-gdb/gdbsupport/common-utils.cc:106:3: error: \u0027vsprintf\u0027 is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use vsnprintf(3) instead. [-Werror,-Wdeprecated-declarations]\n      106 |   vsprintf (\u0026str[0], fmt, vp);\n          |   ^\n    /Users/smarchi/src/binutils-gdb/gdbsupport/common-utils.cc:128:3: error: \u0027vsprintf\u0027 is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use vsnprintf(3) instead. [-Werror,-Wdeprecated-declarations]\n      128 |   vsprintf (\u0026str[0], fmt, args);\n          |   ^\n    /Users/smarchi/src/binutils-gdb/gdbsupport/common-utils.cc:166:3: error: \u0027vsprintf\u0027 is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use vsnprintf(3) instead. [-Werror,-Wdeprecated-declarations]\n      166 |   vsprintf (\u0026str[curr_size], fmt, args);\n          |   ^\n\nWe know that those calls should be safe because we computed the size that\nfmt+args take just before, and allocated that many bytes.  But I also\ndon\u0027t see a real downside in switching those calls to use vsnprintf and\ndouble check that everything went right.\n\nChange the type of the existing \"size\" variable in \"string_vprintf\" to\n\"int\", since that\u0027s what vsnprintf returns.\n\nChange-Id: I589d9a170fdd15cc31b44b76689c6d8c324e340a\nApproved-By: Andrew Burgess \u003caburgess@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3ae3afcc380bf35c7b9a04d885b66d640e1886e4",
      "old_mode": 33188,
      "old_path": "gdbsupport/common-utils.cc",
      "new_id": "f31699be13a1e87564186715c16afa72f51cb282",
      "new_mode": 33188,
      "new_path": "gdbsupport/common-utils.cc"
    }
  ]
}
